All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class semper.txlayer.container.Container

java.lang.Object
   |
   +----semper.txlayer.container.Container

public class Container
extends Object
implements Containable, Transferable, Serializable
Treelike structure that can contain arbitrary Containables. Can be transferred with ContainerTransfer.


Variable Index

 o _cont
 o _v

Constructor Index

 o Container()
The empty constructor.
 o Container(Containable)
Construct Container with one initial objects.
 o Container(Containable, Containable)
Construct Container with two initial objects.
 o Container(Containable, Containable, Containable)
Construct Container with three initial objects.
 o Container(Containable, Containable, Containable, Containable)
Construct Container with four initial objects.
 o Container(Containable[])
Construct Container from array of Containables.

Method Index

 o append(Containable)
Appends Containable to the internal Vector.
 o contains(Containable)
Tests whether a Containable is contained in the Container.
 o delete(Containable)
Deletes one occurence of Containable c in the internal Vector.
 o delete(int)
Deletes Containable at position i in the internal Vector.
 o elementAt(int)
Subscript-Operator.
 o getArrayOfContainables()
 o getDescription()
Describable interface:
 o getTransferTransaction()
Transferable interface:
 o getVectorOfContainables()
 o indexOf(Containable)
Searches the Container for an Object.
 o indexOf(Containable, int)
Searches a Container for the occurence of an Object after position i.
 o insert(Containable, int)
Inserts Containable at position i in the internal Vector.
 o registerContainer(Container)
 o size()
 o toString()

Variables

 o _v
 protected Vector _v
 o _cont
 protected Container _cont

Constructors

 o Container
 public Container()
The empty constructor.

 o Container
 public Container(Containable c)
Construct Container with one initial objects.

 o Container
 public Container(Containable c0,
                  Containable c1)
Construct Container with two initial objects.

 o Container
 public Container(Containable c0,
                  Containable c1,
                  Containable c2)
Construct Container with three initial objects.

 o Container
 public Container(Containable c0,
                  Containable c1,
                  Containable c2,
                  Containable c3)
Construct Container with four initial objects.

 o Container
 public Container(Containable ca[])
Construct Container from array of Containables.

Methods

 o delete
 public void delete(Containable c)
Deletes one occurence of Containable c in the internal Vector. When there are multiple occurences of c, only the first is removed.

Parameters:
c - The Containable to remove.
 o delete
 public void delete(int i) throws ArrayIndexOutOfBoundsException
Deletes Containable at position i in the internal Vector. Counting starts with 0.

Parameters:
i - The position of the object to be removed.
Throws: ArrayIndexOutOfBoundsException
When i is invalid.
 o insert
 public void insert(Containable c,
                    int i) throws ArrayIndexOutOfBoundsException
Inserts Containable at position i in the internal Vector.

Parameters:
c - The Containable to insert.
i - The position to which it is to be inserted.
Throws: ArrayIndexOutOfBoundsException
When i is invalid.
 o append
 public void append(Containable c)
Appends Containable to the internal Vector.

Parameters:
c - The Containable to append.
 o contains
 public boolean contains(Containable c)
Tests whether a Containable is contained in the Container.

Parameters:
c - The Containable to test for.
Returns:
true, if Containable c is at least once in the container. false otherwise.
 o elementAt
 public Containable elementAt(int i) throws ArrayIndexOutOfBoundsException
Subscript-Operator. Gets a reference to the i-th element of the container. Counting starts with 0.

Parameters:
i - The position of the object to retrieve.
Returns:
The object at the ith position.
 o indexOf
 public int indexOf(Containable c)
Searches the Container for an Object. Note: Subcontainers are not searched thru!

Parameters:
c - The Containable to be searched in the Container.
Returns:
the index of the first occurence of Containable object c. Counting starts with 0.
 o indexOf
 public int indexOf(Containable c,
                    int i)
Searches a Container for the occurence of an Object after position i. Note: Subcontainers are not searched thru!

Parameters:
c - The Containable to be searched in the Container.
i - The position to start the search.
Returns:
the index of the occurence of Containable object c after pos i.
 o size
 public int size()
Returns:
The number of Containables in this container.
 o getArrayOfContainables
 public Containable[] getArrayOfContainables()
Returns:
The inside vector as an array of Containables.
 o getVectorOfContainables
 public Vector getVectorOfContainables() throws CloneNotSupportedException
Returns:
The inside vector as an java.util.Vector of Containables.
Throws: CloneNotSupportedException
When the Vector does not want to be cloned. Should never happen.
 o registerContainer
 public boolean registerContainer(Container c)
 o getDescription
 public Description getDescription()
Describable interface:

 o getTransferTransaction
 public TransferTransaction getTransferTransaction()
Transferable interface:

 o toString
 public String toString()
Overrides:
toString in class Object

All Packages  Class Hierarchy  This Package  Previous  Next  Index