org.apache.xalan.lib.sql
Class ObjectArray

java.lang.Object
  extended byorg.apache.xalan.lib.sql.ObjectArray

public class ObjectArray
extends Object

Provide a simple Array storage mechinsim where native Arrays will be use as the basic storage mechinism but the Arrays will be stored as blocks. The size of the Array blocks is determine during object construction. This is intended to be a simple storage mechinsim where the storage only can grow. Array elements can not be removed, only added to.


Nested Class Summary
(package private)  class ObjectArray._ObjectArray
           
 
Field Summary
private  Vector m_Arrays
          The container of all the sub arrays
private  ObjectArray._ObjectArray m_currentArray
          An index that porvides the Vector entry for the current Array that is being appended to.
private  int m_minArraySize
           
private  int m_nextSlot
          The next offset in the current Array to append a new object
 
Constructor Summary
ObjectArray()
           
ObjectArray(int minArraySize)
           
 
Method Summary
 int append(Object o)
           
 Object getAt(int idx)
           
private  void init(int size)
           
static void main(String[] args)
           
 void setAt(int idx, Object obj)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_minArraySize

private int m_minArraySize

m_Arrays

private Vector m_Arrays
The container of all the sub arrays


m_currentArray

private ObjectArray._ObjectArray m_currentArray
An index that porvides the Vector entry for the current Array that is being appended to.


m_nextSlot

private int m_nextSlot
The next offset in the current Array to append a new object

Constructor Detail

ObjectArray

public ObjectArray()

ObjectArray

public ObjectArray(int minArraySize)
Parameters:
minArraySize - The size of the Arrays stored in the Vector
Method Detail

init

private void init(int size)
Parameters:
size -
Returns:

getAt

public Object getAt(int idx)
Parameters:
idx - Index of the Object in the Array
Returns:

setAt

public void setAt(int idx,
                  Object obj)
Parameters:
idx - Index of the Object in the Array
obj - , The value to set in the Array
Returns:

append

public int append(Object o)
Parameters:
o - Object to be appended to the Array
Returns:

main

public static void main(String[] args)
Parameters:
args -
Returns: