public class AttributeMap<T> extends Object implements Serializable, Cloneable
Modifier and Type | Class and Description |
---|---|
static class |
AttributeMap.DualKey |
Constructor and Description |
---|
AttributeMap()
Default constructor.
|
AttributeMap(AttributeMap copy)
Creates a new attribute map using the given parameter as source for the initial values.
|
Modifier and Type | Method and Description |
---|---|
void |
clear() |
AttributeMap<T> |
clone()
Creates a copy of this map.
|
boolean |
equals(Object o) |
T |
getAttribute(String namespace,
String attribute)
Returns the attribute value for the given namespace and attribute-name.
|
Map<String,T> |
getAttributes(String namespace)
Returns all attributes of the given namespace as unmodifiable map.
|
T |
getFirstAttribute(String attribute)
Looks up all namespaces and returns the value from the first namespace that has this attribute defined.
|
String[] |
getNames(String namespace)
Returns all names for the given namespace that have values in this map.
|
String[] |
getNameSpaces()
Returns all namespaces that have values in this map.
|
int |
hashCode() |
Set<AttributeMap.DualKey> |
keySet() |
void |
putAll(AttributeMap<T> attributeMap) |
T |
setAttribute(String namespace,
String attribute,
T value)
Defines the attribute for the given namespace and attribute name.
|
String |
toString() |
public AttributeMap()
public AttributeMap(AttributeMap copy)
copy
- the attribute map that should be copied.public AttributeMap<T> clone()
public T setAttribute(String namespace, String attribute, T value)
namespace
- the namespace under which the value should be stored.attribute
- the attribute name under which the value should be stored within the namespace.value
- the value.public T getAttribute(String namespace, String attribute)
namespace
- the namespace.attribute
- the attribute name.public T getFirstAttribute(String attribute)
attribute
- the the attribute name.public Map<String,T> getAttributes(String namespace)
namespace
- the namespace for which the attributes should be returned.public String[] getNames(String namespace)
namespace
- the namespace for which known attribute names should be looked up.public Set<AttributeMap.DualKey> keySet()
public String[] getNameSpaces()
public void putAll(AttributeMap<T> attributeMap)
public void clear()
Copyright © 2019 Hitachi Vantara. All rights reserved.