org.ozoneDB.DxLib
Class DxArrayBag
java.lang.Object
|
+--org.ozoneDB.DxLib.DxObject
|
+--org.ozoneDB.DxLib.DxAbstractCollection
|
+--org.ozoneDB.DxLib.DxAbstractBag
|
+--org.ozoneDB.DxLib.DxArrayBag
- All Implemented Interfaces:
- java.lang.Cloneable, DxBag, DxCollection, DxCompatible, DxVector, DxVectorCollection, java.io.Externalizable, java.io.Serializable
- Direct Known Subclasses:
- DxArrayDeque
- public class DxArrayBag
- extends DxAbstractBag
- implements DxVector, DxVectorCollection
- Version:
- $Revision: 1.1 $Date: 2001/12/18 10:31:30 $
- Author:
- SMB
- See Also:
- Serialized Form
Methods inherited from class org.ozoneDB.DxLib.DxAbstractCollection |
addAll, addAll, clone, contains, containsAll, readExternal, remove, removeAll, toArray, valueClone, writeExternal |
Methods inherited from class java.lang.Object |
finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
serialVersionUID
static final long serialVersionUID
- See Also:
- Constant Field Values
vector
private transient java.util.Vector vector
itemCount
private transient int itemCount
DxArrayBag
public DxArrayBag()
DxArrayBag
public DxArrayBag(int initSpace)
addFront
public boolean addFront(java.lang.Object obj)
- Specified by:
addFront
in interface DxBag
addBack
public boolean addBack(java.lang.Object obj)
- Specified by:
addBack
in interface DxBag
- Overrides:
addBack
in class DxAbstractBag
addAtIndex
public java.lang.Object addAtIndex(java.lang.Object obj,
int index)
- Sets the component at the specified index of this vector to be the
specified object. The previous component at that position is returned.
The index must be a value greater than or equal to 0. The size of the
array will grow if the specified index is greater than the current size.
- Specified by:
addAtIndex
in interface DxVector
elementAtIndex
public java.lang.Object elementAtIndex(int index)
- Specified by:
elementAtIndex
in interface DxVector
removeAtIndex
public java.lang.Object removeAtIndex(int index)
- Sets the component at the specified index to be null. The previous
component at that position is returned. The index must be a value
greater than or equal to 0 and less than the current size.
- Specified by:
removeAtIndex
in interface DxVector
insertAtIndex
public void insertAtIndex(java.lang.Object obj,
int index)
- Inserts the specified object as a component at the specified index. Each
component with an index greater or equal to the specified index is
shifted upward to have an index one greater than the value it had
previously. The index must be a value greater than or equal to 0 and less
than or equal to the current size of the vector.
- Specified by:
insertAtIndex
in interface DxVector
deleteAtIndex
public java.lang.Object deleteAtIndex(int index)
- Deletes the component at the specified index. Each component in this
array with an index greater or equal to the specified index is shifted
downward to have an index one smaller than the value it had previously.
The index must be a value greater than or equal to 0 and less than the
current size.
- Specified by:
deleteAtIndex
in interface DxVector
space
public int space()
- Specified by:
space
in interface DxVector
iterator
public DxIterator iterator()
- Specified by:
iterator
in interface DxCollection
count
public int count()
- Specified by:
count
in interface DxCollection
size
public int size()
- Specified by:
size
in interface DxVector
isEmpty
public boolean isEmpty()
- Specified by:
isEmpty
in interface DxCollection
clear
public void clear()
- Specified by:
clear
in interface DxCollection
internalVector
public java.util.Vector internalVector()
- Specified by:
internalVector
in interface DxVectorCollection
decCounter
public void decCounter()
- Specified by:
decCounter
in interface DxVectorCollection
Copyright (C) The Ozone Database Project - www.ozone-db.org. All rights reserved.