com.ximpleware
Class FastObjectBuffer

java.lang.Object
  extended by com.ximpleware.FastObjectBuffer

public class FastObjectBuffer
extends java.lang.Object

Fast object array implementation


Constructor Summary
FastObjectBuffer()
          FastIntBuffer constructor comment.
FastObjectBuffer(int e)
          Constructor with adjustable buffer page size of the value bfz
 
Method Summary
 void append(java.lang.Object obj)
          Append a single object to the end of this buffer Instance
 void append(java.lang.Object[] obj_array)
          Append an object array to the end of this buffer instance
 void clear()
          set the size of object buffer to zero, capacity untouched so object buffer can be reused without any unnecessary and additional allocation
 int getCapacity()
          Returns the total allocated capacity of this buffer instance.
 java.lang.Object[] getObjectArray(int startingOffset, int len)
          Returns a single object array representing every object in this buffer instance
 int getPageSize()
          Returns the page size of this buffer instance.
 void modifyEntry(int index, java.lang.Object newValue)
          Assigns a new int value to location index of the buffer instance.
 java.lang.Object objectAt(int index)
          Get the object at the location specified by index.
 int size()
          Returns the total number of objects in the buffer instance
 java.lang.Object[] toObjectArray()
          Returns the object array corresponding to all objects in this buffer instance
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FastObjectBuffer

public FastObjectBuffer()
FastIntBuffer constructor comment.


FastObjectBuffer

public FastObjectBuffer(int e)
Constructor with adjustable buffer page size of the value bfz

Parameters:
e - int
Method Detail

append

public void append(java.lang.Object obj)
Append a single object to the end of this buffer Instance

Parameters:
obj -

append

public void append(java.lang.Object[] obj_array)
Append an object array to the end of this buffer instance

Parameters:
obj_array - Object[]

clear

public void clear()
set the size of object buffer to zero, capacity untouched so object buffer can be reused without any unnecessary and additional allocation


getCapacity

public int getCapacity()
Returns the total allocated capacity of this buffer instance.

Returns:
int

getObjectArray

public java.lang.Object[] getObjectArray(int startingOffset,
                                         int len)
Returns a single object array representing every object in this buffer instance

Parameters:
startingOffset - int
len - int
Returns:
Object[] (null if there isn't anything left in the buffer

getPageSize

public int getPageSize()
Returns the page size of this buffer instance. Creation date: (7/17/03 6:38:02 PM)

Returns:
int

modifyEntry

public void modifyEntry(int index,
                        java.lang.Object newValue)
Assigns a new int value to location index of the buffer instance.

Parameters:
index - int
newValue - int

objectAt

public java.lang.Object objectAt(int index)
Get the object at the location specified by index.

Parameters:
index - int
Returns:
int

size

public int size()
Returns the total number of objects in the buffer instance

Returns:
int

toObjectArray

public java.lang.Object[] toObjectArray()
Returns the object array corresponding to all objects in this buffer instance

Returns:
Object[] (null if the buffer is empty)