com.ximpleware
Class FastObjectBuffer

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

public class FastObjectBuffer
extends Object

Fast object array implementation


Field Summary
protected  int size
          Total number of objects in the IntBuffer
 
Constructor Summary
FastObjectBuffer()
          FastIntBuffer constructor comment.
FastObjectBuffer(int e)
          Constructor with adjustable buffer page size of the value bfz
 
Method Summary
 void append(Object obj)
          Append a single object to the end of this buffer Instance
 void append(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.
 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, Object newValue)
          Assigns a new int value to location index of the buffer instance.
 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
 Object[] toObjectArray()
          Returns the object array corresponding to all objects in this buffer instance
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

size

protected int size
Total number of objects in the IntBuffer

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(Object[] obj_array)
Append an object array to the end of this buffer instance

Parameters:
obj_array - Object[]

append

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

Parameters:
obj -

getCapacity

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

Returns:
int

getObjectArray

public 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 final int getPageSize()
Returns the page size of this buffer instance. Creation date: (7/17/03 6:38:02 PM)

Returns:
int

objectAt

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

Parameters:
index - int
Returns:
int

modifyEntry

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

Parameters:
index - int
newValue - int

size

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

Returns:
int

toObjectArray

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

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

clear

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



Copyright © 2013. All Rights Reserved.