|
AROM-2_2_13 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
An InstanceSet object represents a set of AROM instances. The InstanceSet interface defines basic operations on the set of AMInstances. An InstanceSet can be associated to a delegate which handles membership conditions. When an AMInstance is added to this instance set, the delegate is invoked to check membership.
Field Summary | |
static String |
INSTANCES
The name of the composite property representing the collection of instances contained in this InstanceSet object. |
Method Summary | |
void |
addInstance(AMInstance instance)
Add the supplied instance to this instance set. |
void |
addInstance(AMInstance instance,
boolean acceptLostSlot)
Add the supplied instance to this instance set. |
boolean |
contains(AMInstance instance)
Tests if the specified instance is a component of this instance set. |
Membership |
getDelegate()
Returns the delegate of this instance set. |
Iterator |
instances()
Returns an iterator over the instances contained in this InstanceSet. |
AMInstance |
removeInstance(AMInstance instance)
Removes the specified instance from this instance set. |
void |
setDelegate(Membership delegate)
Sets the specified object as the delegate of this instance set. |
int |
size()
Returns the number of instances contained in this instance set. |
Methods inherited from interface helix.util.beans.CompoundPropertySet |
addCompositionChangeListener, addCompositionChangeListener, addVetoableCompositionChangeListener, addVetoableCompositionChangeListener, removeCompositionChangeListener, removeCompositionChangeListener, removeVetoableCompositionChangeListener, removeVetoableCompositionChangeListener |
Field Detail |
public static final String INSTANCES
Method Detail |
public Iterator instances()
public int size()
public boolean contains(AMInstance instance)
instance
- an instance.
true
if the specified instance is the same as
a component of this instance set, as determined by the equals
method, false
otherwise.public void addInstance(AMInstance instance) throws MembershipVetoException
If none delegate is set to this instance set, the instance is added to the set if all instance slots are preserved.
No action is performed if the supplied instance is already a component of this instance set.
instance
- the instance to be added.
MembershipVetoException
- if the supplied instance can not be added
to the instance set.public void addInstance(AMInstance instance, boolean acceptLostSlot) throws MembershipVetoException
If none delegate is set to this instance set, the instance is added to the
set if all instance slots are preserved or if acceptLostSlot
is set to true.
No action is performed if the supplied instance is already a component of this instance set.
instance
- the instance to be added.acceptLostSlot
- if set to true the instance is added to this InstanceSet even
if some slots information will be lost.
MembershipVetoException
- if the supplied instance can not be added
to the instance set.public AMInstance removeInstance(AMInstance instance)
instance
- the instance to be removed.
null
if the supplied
instance was not found in the instance set.public void setDelegate(Membership delegate)
delegate
- the delegate of this instance set.public Membership getDelegate()
|
AROM-2_2_13 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |