public final class Attributes extends Object
Constructor and Description |
---|
Attributes(Attribute... attributes)
Creates a new instance
|
Modifier and Type | Method and Description |
---|---|
boolean |
canBeContentMerged()
Test if the given attributes implies to handle the related entry as a
binary file (i.e.
|
boolean |
containsKey(String key)
Whether there is an attribute with this key
|
boolean |
equals(Object obj) |
Attribute |
get(String key)
Get the attribute with the given key
|
Collection<Attribute> |
getAll()
Get all attributes
|
Attribute.State |
getState(String key)
Return the state.
|
String |
getValue(String key)
Get attribute value
|
int |
hashCode() |
boolean |
isCustom(String key)
Is this a custom attribute
|
boolean |
isEmpty()
Whether the set of attributes is empty
|
boolean |
isSet(String key)
Whether the attribute is set
|
boolean |
isUnset(String key)
Whether the attribute is unset
|
boolean |
isUnspecified(String key)
Whether the attribute with the given key is unspecified
|
void |
put(Attribute a)
Put an attribute
|
void |
remove(String key)
Remove attribute with given key
|
String |
toString() |
public boolean isEmpty()
public Attribute get(String key)
key
- a String
object.public Collection<Attribute> getAll()
public void remove(String key)
key
- an attribute namepublic boolean containsKey(String key)
key
- key of an attributeAttributes
contains this keypublic Attribute.State getState(String key)
key
- key of an attributenull
)public boolean isSet(String key)
key
- a String
object.Attribute.State.SET
, false in
all other casespublic boolean isUnset(String key)
key
- a String
object.Attribute.State.UNSET
, false
in all other casespublic boolean isUnspecified(String key)
key
- a String
object.Attribute.State.UNSPECIFIED
,
false in all other casespublic boolean isCustom(String key)
key
- a String
object.Attribute.State.CUSTOM
, false
in all other cases see getValue(String)
for the value of
the keypublic String getValue(String key)
key
- an attribute keynull
)public boolean canBeContentMerged()
true
if the entry can be content merged,
false
otherwiseCopyright © 2019 Eclipse JGit Project. All rights reserved.