net.sf.opendse.model
Interface IAttributes

All Known Implementing Classes:
Attributes, Communication, Dependency, Edge, Element, Function, Link, Mapping, Node, Resource, Specification, Task

public interface IAttributes

The IAttributes interface applies for classes that contain attributes. An attribute is pair of an identifier and a value object. The identifier must be a String.


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.
 IAttributes getAttributes()
          Returns the map of all pairs of attributes.
 boolean isDefined(java.lang.String identifier)
          Tests whether an attribute is defined.
 void setAttribute(java.lang.String identifier, java.lang.Object object)
          Sets the attribute.
 

Method Detail

setAttribute

void setAttribute(java.lang.String identifier,
                  java.lang.Object object)
Sets the attribute.

Parameters:
identifier - the identifier of the attribute
object - the value of the attribute

getAttribute

<O> O getAttribute(java.lang.String identifier)
Returns the attribute

Type Parameters:
O - the type of the attribute
Parameters:
identifier - the identifier of the attribute
Returns:
the value of the value of the attribute

getAttributeParameter

Parameter getAttributeParameter(java.lang.String identifier)
Return the parameter definition or null if the attribute is not defined as parameter.

Parameters:
identifier - the identifier of the attribute
Returns:
the parameter

getAttributes

IAttributes getAttributes()
Returns the map of all pairs of attributes.

Returns:
the attribute map

getAttributeNames

java.util.Set<java.lang.String> getAttributeNames()
Returns the attribute names.

Returns:
the attribute names

isDefined

boolean isDefined(java.lang.String identifier)
Tests whether an attribute is defined.

Parameters:
identifier - the identifier of the attribute
Returns:
true if defined