org.jpedal.utils.repositories
Class Vector_Object

java.lang.Object
  extended by org.jpedal.utils.repositories.Vector_Object
All Implemented Interfaces:
java.io.Serializable

public class Vector_Object
extends java.lang.Object
implements java.io.Serializable

Provides the functionality/convenience of a Vector for objects - Much faster because not synchronized and no cast - Does not double in size each time

See Also:
Serialized Form

Constructor Summary
Vector_Object()
           
Vector_Object(int number)
           
 
Method Summary
 void addElement(java.lang.Object value)
          add an item
 void clear()
          clear the array
 boolean contains(java.lang.Object value)
          see if value present
 java.lang.Object elementAt(int id)
          remove element at
 java.lang.Object[] get()
          extract underlying data
 java.lang.Object pull()
          pull item from top as in LIFO stack
 void push(java.lang.Object value)
          put item at top as in LIFO stack
 void removeElementAt(int id)
          remove element at
 void resetToCheckpoint()
          used to store end of PDF components
 void restoreFromStream(java.io.ByteArrayInputStream bis)
          method to deserialize each object in the input stream NOT PART OF API and subject to change (DO NOT USE)
 void set(java.lang.Object[] new_items)
          replace underlying data
 void setCheckpoint()
          used to rollback array to point
 void setElementAt(java.lang.Object new_name, int id)
          set an element
 void setSize(int currentItem)
          reset pointer used in add to remove items above
 int size()
          return the size
 void trim()
           
 void writeToStream(java.io.ByteArrayOutputStream bos)
          method to serialize each element in this collection NOT PART OF API and subject to change (DO NOT USE)
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Vector_Object

public Vector_Object()

Vector_Object

public Vector_Object(int number)
Method Detail

resetToCheckpoint

public void resetToCheckpoint()
used to store end of PDF components


setCheckpoint

public void setCheckpoint()
used to rollback array to point


get

public final java.lang.Object[] get()
extract underlying data


pull

public final java.lang.Object pull()
pull item from top as in LIFO stack


push

public final void push(java.lang.Object value)
put item at top as in LIFO stack


contains

public final boolean contains(java.lang.Object value)
see if value present


addElement

public final void addElement(java.lang.Object value)
add an item


setElementAt

public final void setElementAt(java.lang.Object new_name,
                               int id)
set an element


elementAt

public final java.lang.Object elementAt(int id)
remove element at


set

public final void set(java.lang.Object[] new_items)
replace underlying data


clear

public final void clear()
clear the array


size

public final int size()
return the size


removeElementAt

public final void removeElementAt(int id)
remove element at


writeToStream

public void writeToStream(java.io.ByteArrayOutputStream bos)
                   throws java.io.IOException
method to serialize each element in this collection NOT PART OF API and subject to change (DO NOT USE)

Parameters:
bos - - the output stream to write the objects out to
Throws:
java.io.IOException

restoreFromStream

public void restoreFromStream(java.io.ByteArrayInputStream bis)
                       throws java.io.IOException,
                              java.lang.ClassNotFoundException
method to deserialize each object in the input stream NOT PART OF API and subject to change (DO NOT USE)

Parameters:
bis - - the input stream to read from
Throws:
java.io.IOException
java.lang.ClassNotFoundException

trim

public void trim()

setSize

public void setSize(int currentItem)
reset pointer used in add to remove items above