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.
-
_cont
-
-
_v
-
-
Container()
- The empty constructor.
-
Container(Containable)
- Construct Container with one initial objects.
-
Container(Containable, Containable)
- Construct Container with two initial objects.
-
Container(Containable, Containable, Containable)
- Construct Container with three initial objects.
-
Container(Containable, Containable, Containable, Containable)
- Construct Container with four initial objects.
-
Container(Containable[])
- Construct Container from array of Containables.
-
append(Containable)
- Appends Containable to the internal Vector.
-
contains(Containable)
- Tests whether a Containable is contained in the Container.
-
delete(Containable)
- Deletes one occurence of Containable c in the internal Vector.
-
delete(int)
- Deletes Containable at position i in the internal Vector.
-
elementAt(int)
- Subscript-Operator.
-
getArrayOfContainables()
-
-
getDescription()
- Describable interface:
-
getTransferTransaction()
- Transferable interface:
-
getVectorOfContainables()
-
-
indexOf(Containable)
- Searches the Container for an Object.
-
indexOf(Containable, int)
- Searches a Container for the occurence of
an Object after position i.
-
insert(Containable, int)
- Inserts Containable at position i in the internal Vector.
-
registerContainer(Container)
-
-
size()
-
-
toString()
-
_v
protected Vector _v
_cont
protected Container _cont
Container
public Container()
- The empty constructor.
Container
public Container(Containable c)
- Construct Container with one initial objects.
Container
public Container(Containable c0,
Containable c1)
- Construct Container with two initial objects.
Container
public Container(Containable c0,
Containable c1,
Containable c2)
- Construct Container with three initial objects.
Container
public Container(Containable c0,
Containable c1,
Containable c2,
Containable c3)
- Construct Container with four initial objects.
Container
public Container(Containable ca[])
- Construct Container from array of Containables.
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.
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.
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.
append
public void append(Containable c)
- Appends Containable to the internal Vector.
- Parameters:
- c - The Containable to append.
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.
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.
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.
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.
size
public int size()
- Returns:
- The number of Containables in this container.
getArrayOfContainables
public Containable[] getArrayOfContainables()
- Returns:
- The inside vector as an array of Containables.
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.
registerContainer
public boolean registerContainer(Container c)
getDescription
public Description getDescription()
- Describable interface:
getTransferTransaction
public TransferTransaction getTransferTransaction()
- Transferable interface:
toString
public String toString()
- Overrides:
- toString in class Object
All Packages Class Hierarchy This Package Previous Next Index