Interface cryptiX.utils.Composite
All Packages Class Hierarchy This Package Previous Next Index
Interface cryptiX.utils.Composite
- public interface Composite
- extends Object
This interface defines the common operations for all objects
following the Composite pattern [Gamma, p. 164].
-
addComponent(Composite)
- Add a new component to the container object.
-
addComponent(Composite, int)
- Add a new component to the container object at a given location.
-
countComponents()
- Returns the number of component objects.
-
getComponent(int)
- Returns the component at the given location within a sequence.
-
getComponents()
- Returns an Enumeration that iterates over the component objects.
-
removeComponent(Composite)
- Removes a component from the container.
-
removeComponent(int)
- Removes a component at the given location within the container.
-
setComponent(int, Composite)
- Sets the component at the given location within a sequence.
addComponent
public abstract void addComponent(Composite component)
- Add a new component to the container object. If the
object accessed is not a container object, throws
NonCompositeException.
addComponent
public abstract void addComponent(Composite component,
int index)
- Add a new component to the container object at a given location.
If the object accessed is not a container object, throws
NonCompositeException.
removeComponent
public abstract void removeComponent(Composite component)
- Removes a component from the container. If the object
accessed is not a container, throws NonCompositeException.
If the component is not in the container, does nothing.
removeComponent
public abstract void removeComponent(int index)
- Removes a component at the given location within the container.
If the object accessed is not a container, throws NonCompositeException.
If the index refers outside bounds, IndexOutOfBounds is thrown.
getComponent
public abstract Composite getComponent(int index)
- Returns the component at the given location within a sequence.
If the object accessed is not a container, throws NonCompositeException.
If the index refers outside bounds, IndexOutOfBounds is thrown.
setComponent
public abstract void setComponent(int index,
Composite value)
- Sets the component at the given location within a sequence.
If the object accessed is not a container, throws NonCompositeException.
If the index refers outside bounds, IndexOutOfBounds is thrown.
countComponents
public abstract int countComponents()
- Returns the number of component objects. Zero if none.
getComponents
public abstract Enumeration getComponents()
- Returns an Enumeration that iterates over the component objects.
Returns a NullEnumeration if this not a container.
All Packages Class Hierarchy This Package Previous Next Index