ozone API

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, org.ozoneDB.DxLib.DxVectorCollection, java.io.Externalizable, java.io.Serializable
Direct Known Subclasses:
DxArrayDeque

public class DxArrayBag
extends DxAbstractBag
implements DxVector, org.ozoneDB.DxLib.DxVectorCollection

Version:
$Revision: 1.1 $Date: 2001/12/18 10:31:30 $
Author:
SMB
See Also:
Serialized Form

Constructor Summary
DxArrayBag()
           
DxArrayBag(int initSpace)
           
 
Method Summary
 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.
 boolean addBack(java.lang.Object obj)
           
 boolean addFront(java.lang.Object obj)
           
 void clear()
           
 int count()
           
 void decCounter()
           
 java.lang.Object deleteAtIndex(int index)
          Deletes the component at the specified index.
 java.lang.Object elementAtIndex(int index)
           
 void insertAtIndex(java.lang.Object obj, int index)
          Inserts the specified object as a component at the specified index.
 java.util.Vector internalVector()
           
 boolean isEmpty()
           
 DxIterator iterator()
           
 java.lang.Object removeAtIndex(int index)
          Sets the component at the specified index to be null.
 int size()
           
 int space()
           
 
Methods inherited from class org.ozoneDB.DxLib.DxAbstractBag
add, equals
 
Methods inherited from class org.ozoneDB.DxLib.DxAbstractCollection
addAll, addAll, clone, contains, containsAll, readExternal, remove, removeAll, toArray, valueClone, writeExternal
 
Methods inherited from class org.ozoneDB.DxLib.DxObject
clone, isLess
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.ozoneDB.DxLib.DxCollection
add, addAll, addAll, clone, contains, containsAll, remove, removeAll, toArray, valueClone
 
Methods inherited from interface org.ozoneDB.DxLib.DxCompatible
equals, isLess
 

Constructor Detail

DxArrayBag

public DxArrayBag()

DxArrayBag

public DxArrayBag(int initSpace)
Method Detail

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 org.ozoneDB.DxLib.DxVectorCollection

decCounter

public void decCounter()
Specified by:
decCounter in interface org.ozoneDB.DxLib.DxVectorCollection

ozone API

Copyright (C) The Ozone Database Project - www.ozone-db.org. All rights reserved.