|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.tensegrity.generic.attribute.event.AbstractAttributableOnSetEvent
com.tensegrity.generic.attribute.event.AttributableOnSetEvent
* This event indicates that a change in the attribute objects of an
AttributableOnSet-object has occured. Registered listeners will
get informed about this event. The receivers can get an description telling
what kind of event occured and a reference to the object where it happened.
| Field Summary | |
static int |
ATTRIBUTES_CHANGED_VALUE
indicator for an attribute change |
| Constructor Summary | |
AttributableOnSetEvent(int eventid,
AttributableOnSet attributableOnSet,
AttributeSet attributeschanged_tablelike,
AttributeSet attributeschanged_treelike,
java.util.Map attribute2oldvalue_tablelike,
java.util.Map attribute2oldvalue_treelike)
Constructor specifying the kind of event and the AttributableOnSet instance this event is raised by.
|
|
| Method Summary | |
AttributeSet |
getChangedAttributes()
Returns an AttributeSet of the Attributes that
have been changed. |
AttributeSet |
getChangedAttributesTree()
Returns an AttributeSet of the Attributes that
have been changed. |
java.lang.Object |
getOldValue(java.lang.String name)
Returns either the old value for the given name
or null if the old value is not specified.
|
java.lang.Object |
getOldValueTree(java.lang.String name)
Returns either the old value for the given name
or null if the old value is not specified.
|
boolean |
hasOldValues()
Returns a boolean that indicates whether this event comes
with the old values for the changed Attribute objects of
the table like structure.
|
boolean |
hasOldValuesTree()
Returns a boolean that indicates whether this event comes
with the old values for the changed Attribute objects of
the tree like structure.
|
java.util.Iterator |
iteratorOldValues()
Returns an Iterator instance which can be used to iterate
over the names of the changed Attribute objects of the
table like structure.
|
java.util.Iterator |
iteratorOldValuesTree()
Returns an Iterator instance which can be used to iterate
over the names of the changed Attribute objects of the
tree like structure.
|
| Methods inherited from class com.tensegrity.generic.attribute.event.AbstractAttributableOnSetEvent |
getAttributableOnSet, getDescription |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final int ATTRIBUTES_CHANGED_VALUE
| Constructor Detail |
public AttributableOnSetEvent(int eventid,
AttributableOnSet attributableOnSet,
AttributeSet attributeschanged_tablelike,
AttributeSet attributeschanged_treelike,
java.util.Map attribute2oldvalue_tablelike,
java.util.Map attribute2oldvalue_treelike)
Constructor specifying the kind of event and the
AttributableOnSet instance this event is raised by.
Optionally the attributes that have been changed can be
specified through the given AttributeSet instances. The
changed attributes should be given in their table like structure as well
as in their tree like structure and should carry their new values.
It is possible to specify the old values of the changed attributes
through the Map instances passed into the constructor. These
object should map the attribute paths onto their old value. This
parameter is also optionally. Accordingly to the changed attributes the
old value Map objects should be given for the table like
structure as well as for the tree like structure.
Additionally the AttributeSet instances and the
Attribute instances that are passed into should be non
mutable.
Notice:Non mutable does not refer to the mutable state of the
Attribute/AttributeSet itself but to be an
Attribute/AttributeSet instance created
through the mthods:
AttributeFactory.immutableAttribute(Attribute)
or respectively
AttributeFactory.immutableAttributeSet(AttributeSet)
When passing null into instead of AttributeSet
instances the receiver of this event has to expect that all attributes
have been changed.
Of course it is possible for this case to pass in the corresponding
Map instances which holds the old values of all attributes.
eventid - the id for this event.attributableOnSet - the AttributableOnSet that raises
this eventattributeschanged_tablelike - the changed Attribute
instances in their table like structureattributeschanged_treelike - the changed Attribute
instances in their tree like structure| Method Detail |
public final AttributeSet getChangedAttributes()
Returns an AttributeSet of the Attributes that
have been changed. The returned AttributeSet could be
null or empty.
In the case that the returned AttributeSet is empty no
Attribute has been changed.
In the case that the returned AttributeSet is
null an undefinable number of Attributes habe
been changed.
The returned AttributSet has the same hierarchical structure
as the AttributeSet returned by
AttributableOnSet.getAttributes().
Attributes that have been changedpublic final AttributeSet getChangedAttributesTree()
Returns an AttributeSet of the Attributes that
have been changed. The returned AttributeSet could be
null or empty.
In the case that the returned AttributeSet is empty no
Attribute has been changed.
In the case that the returned AttributeSet is
null an undefinable number of Attributes habe
been changed.
The returned AttributSet has the same hierarchical structure
as the AttributeSet returned by
AttributableOnSet.getAttributesTree().
Attributes that have been changedpublic final boolean hasOldValues()
Returns a boolean that indicates whether this event comes
with the old values for the changed Attribute objects of
the table like structure.
Attribute objectspublic final java.util.Iterator iteratorOldValues()
Returns an Iterator instance which can be used to iterate
over the names of the changed Attribute objects of the
table like structure.
Notice:Name does not mean the name of the attribute. Furthermore
it refers to the name the old values can be queried by from this event.
In fact the name is the complete path of the attribute plus its
name.
public final java.lang.Object getOldValue(java.lang.String name)
Returns either the old value for the given name
or null if the old value is not specified.
In order to get the old value the given name
must refer to an Attribute object located (directly or
indirectly) within the AttributeSet instance returned by
getChangedAttributes().
name - the key of the old value that is querried
Attribute
instance or null if the old value is not specifiediteratorOldValues()public final boolean hasOldValuesTree()
Returns a boolean that indicates whether this event comes
with the old values for the changed Attribute objects of
the tree like structure.
Attribute objectspublic final java.util.Iterator iteratorOldValuesTree()
Returns an Iterator instance which can be used to iterate
over the names of the changed Attribute objects of the
tree like structure.
Notice:Name does not mean the name of the attribute. Furthermore
it refers to the name the old values can be queried by from this event.
In fact the name is the complete path of the attribute plus its
name.
public final java.lang.Object getOldValueTree(java.lang.String name)
Returns either the old value for the given name
or null if the old value is not specified.
In order to get the old value the given name
must refer to an Attribute object located (directly or
indirectly) within the AttributeSet instance returned by
getChangedAttributesTree().
name - the key of the old value that is querried
Attribute
instance or null if the old value is not specifiediteratorOldValuesTree()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||