com.orientechnologies.jdo.utils
Class oReusableArray

java.lang.Object
  extended bycom.orientechnologies.jdo.utils.oReusableArray

public class oReusableArray
extends java.lang.Object

Special array that reuse empty rooms created on deletion of elements. In this way objects mantain the same position across deletion and new element are reused.


Constructor Summary
oReusableArray()
           
oReusableArray(int iOffset)
           
 
Method Summary
 int add(java.lang.Object iElement)
          Insert an element in the list
 java.lang.Object get(int iPos)
          Get an element
 java.util.Iterator iterator()
           
 java.lang.Object remove(int iPos)
          Free the position required
 int size()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

oReusableArray

public oReusableArray()

oReusableArray

public oReusableArray(int iOffset)
Method Detail

iterator

public java.util.Iterator iterator()

size

public int size()

get

public java.lang.Object get(int iPos)
Get an element

Parameters:
iPos - Element position
Returns:
the element required in the list

add

public int add(java.lang.Object iElement)
Insert an element in the list

Parameters:
iElement - Element to insert
Returns:
The new immutable position in list

remove

public java.lang.Object remove(int iPos)
Free the position required

Parameters:
iPos - Position