net.sf.opendse.model
Class Attributes

java.lang.Object
  extended by java.util.AbstractMap<K,V>
      extended by java.util.TreeMap<java.lang.String,java.lang.Object>
          extended by net.sf.opendse.model.Attributes
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, java.util.Map<java.lang.String,java.lang.Object>, java.util.NavigableMap<java.lang.String,java.lang.Object>, java.util.SortedMap<java.lang.String,java.lang.Object>, IAttributes

public class Attributes
extends java.util.TreeMap<java.lang.String,java.lang.Object>
implements IAttributes

The Attributes is the default implementation of the IAttributes interface using a HashMap.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class java.util.AbstractMap
java.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V>
 
Constructor Summary
Attributes()
           
 
Method Summary
<O> O
getAttribute(java.lang.String identifier)
          Returns the attribute
 java.util.Set<java.lang.String> getAttributeNames()
          Returns the attribute names.
 Parameter getAttributeParameter(java.lang.String identifier)
          Return the parameter definition or null if the attribute is not defined as parameter.
 Attributes getAttributes()
          Returns the map of all pairs of attributes.
 boolean isDefined(java.lang.String identifier)
          Tests whether an attribute is defined.
 boolean isParameter(java.lang.String identifier)
          Returns true if the attribute value is a parameter.
 void setAttribute(java.lang.String identifier, java.lang.Object object)
          Sets the attribute.
 
Methods inherited from class java.util.TreeMap
ceilingEntry, ceilingKey, clear, clone, comparator, containsKey, containsValue, descendingKeySet, descendingMap, entrySet, firstEntry, firstKey, floorEntry, floorKey, get, headMap, headMap, higherEntry, higherKey, keySet, lastEntry, lastKey, lowerEntry, lowerKey, navigableKeySet, pollFirstEntry, pollLastEntry, put, putAll, remove, size, subMap, subMap, tailMap, tailMap, values
 
Methods inherited from class java.util.AbstractMap
equals, hashCode, isEmpty, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Map
equals, hashCode, isEmpty
 

Constructor Detail

Attributes

public Attributes()
Method Detail

getAttribute

public <O> O getAttribute(java.lang.String identifier)
Description copied from interface: IAttributes
Returns the attribute

Specified by:
getAttribute in interface IAttributes
Type Parameters:
O - the type of the attribute
Parameters:
identifier - the identifier of the attribute
Returns:
the value of the value of the attribute

setAttribute

public void setAttribute(java.lang.String identifier,
                         java.lang.Object object)
Description copied from interface: IAttributes
Sets the attribute.

Specified by:
setAttribute in interface IAttributes
Parameters:
identifier - the identifier of the attribute
object - the value of the attribute

getAttributes

public Attributes getAttributes()
Description copied from interface: IAttributes
Returns the map of all pairs of attributes.

Specified by:
getAttributes in interface IAttributes
Returns:
the attribute map

getAttributeParameter

public Parameter getAttributeParameter(java.lang.String identifier)
Description copied from interface: IAttributes
Return the parameter definition or null if the attribute is not defined as parameter.

Specified by:
getAttributeParameter in interface IAttributes
Parameters:
identifier - the identifier of the attribute
Returns:
the parameter

getAttributeNames

public java.util.Set<java.lang.String> getAttributeNames()
Description copied from interface: IAttributes
Returns the attribute names.

Specified by:
getAttributeNames in interface IAttributes
Returns:
the attribute names

isParameter

public boolean isParameter(java.lang.String identifier)
Returns true if the attribute value is a parameter.

Parameters:
identifier - the identifier
Returns:
true if the attribute value is a parameter

isDefined

public boolean isDefined(java.lang.String identifier)
Description copied from interface: IAttributes
Tests whether an attribute is defined.

Specified by:
isDefined in interface IAttributes
Parameters:
identifier - the identifier of the attribute
Returns:
true if defined