public class Attributes extends Object implements Serializable
Modifier and Type | Field and Description |
---|---|
protected Map<String,Attribute> |
m_attributes |
Constructor and Description |
---|
Attributes() |
Attributes(Collection<Attribute> attributes) |
Modifier and Type | Method and Description |
---|---|
boolean |
containsAttribute(String key)
Returns true if an attribute with the given key is present.
|
boolean |
equals(Object o) |
Attribute |
getAttribute(String key)
Gets an Attribute for a given key.
|
Set<String> |
getAttributeNames()
Gets the attribute names.
|
Collection<Attribute> |
getAttributes()
Gets the attributes.
|
String |
getStringAttributeValue(String key)
Gets the value of an Attribute with StringAttributeValue.
|
int |
hashCode() |
boolean |
isEmpty() |
Attributes |
putAttribute(Attribute attribute)
Method puts an attribute in the environment.
|
Attributes |
putAttribute(String key,
String value)
Method puts a simple StringAttribute in the environment.
|
Attributes |
putAttributes(Collection<Attribute> attributes)
Method puts a collection of attributes in the environment.
|
Attributes |
removeAttribute(Attribute attribute)
Method removes the attribute from the environment.
|
Attributes |
removeAttribute(String key)
Method removes the attribute with the given key.
|
Attributes |
removeAttributes(Collection<Attribute> attributes)
Method removes all attributes in the collection.
|
int |
size()
Method gets the size.
|
String |
toString() |
public Attributes()
public Attributes(Collection<Attribute> attributes)
public Collection<Attribute> getAttributes()
public Set<String> getAttributeNames()
public boolean isEmpty()
public Attribute getAttribute(String key)
key
- the key of the attribute.public String getStringAttributeValue(String key)
key
- the key of the attribute.public boolean containsAttribute(String key)
key
- a key, asserted to be not null.public Attributes putAttribute(Attribute attribute)
attribute
- the attribute.public Attributes putAttribute(String key, String value)
key
- the key.value
- the value.public Attributes putAttributes(Collection<Attribute> attributes)
attributes
- the attributes.public Attributes removeAttribute(String key)
key
- the key.public Attributes removeAttributes(Collection<Attribute> attributes)
attributes
- the attributes.public Attributes removeAttribute(Attribute attribute)
attribute
- the attribute.public int size()
Copyright © 2004–2017 52north.org. All rights reserved.