java.beans.beancontext

Class BeanContextMembershipEvent

public class BeanContextMembershipEvent extends BeanContextEvent

Event fired when children are added to or removed from a BeanContext. Whether they were added or removed depends entirely on which method of the listener interface was called.

Since: 1.2

See Also: BeanContextMembershipListener

Field Summary
protected Collectionchildren
The children that were added or removed.
Constructor Summary
BeanContextMembershipEvent(BeanContext context, Collection children)
Create a new membership event.
BeanContextMembershipEvent(BeanContext context, Object[] children)
Create a new membership event.
Method Summary
booleancontains(Object child)
Tell whether the Object is one of the children added or removed.
Iteratoriterator()
An iterator that will step through all the children.
intsize()
The number of children removed or added.
Object[]toArray()
An array of the children.

Field Detail

children

protected Collection children
The children that were added or removed.

Constructor Detail

BeanContextMembershipEvent

public BeanContextMembershipEvent(BeanContext context, Collection children)
Create a new membership event.

Parameters: context the event source. children the children added to or removed from the source.

BeanContextMembershipEvent

public BeanContextMembershipEvent(BeanContext context, Object[] children)
Create a new membership event.

Parameters: context the event source. children the children added to or removed from the source.

Method Detail

contains

public boolean contains(Object child)
Tell whether the Object is one of the children added or removed.

Parameters: child the child to check.

Returns: whether the Object is added or removed.

iterator

public Iterator iterator()
An iterator that will step through all the children.

Returns: an iterator over all the children.

size

public int size()
The number of children removed or added.

Returns: the number of children removed or added.

toArray

public Object[] toArray()
An array of the children.

Returns: an array of the children.