org.jpedal.utils.repositories
Class Vector_Int

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

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

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

See Also:
Serialized Form

Constructor Summary
Vector_Int()
           
Vector_Int(int number)
           
 
Method Summary
 void add_together(int master, int child)
           
 void addElement(int value)
          add an item
 void clear()
          clear the array
 boolean contains(int value)
          see if value present
 void deleteElementWithValue(int id)
          delete element at
 int elementAt(int id)
          get element at
 int[] get()
          extract underlying data
 int getCapacity()
          return the sizeof array
 void keep_larger(int master, int child)
           
 void keep_smaller(int master, int child)
           
 int pull()
          pull item from top as in LIFO stack
 void push(int 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 reuse()
          recycle the array by just resetting the pointer
 void set(int[] new_items)
          replace underlying data
 void setCheckpoint()
          used to rollback array to point
 void setElementAt(int 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+1 as in last item (so an array of 0 values is 1) if added If using set, use checkCapacity
 java.lang.String toString()
           
 void trim()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Vector_Int

public Vector_Int()

Vector_Int

public Vector_Int(int number)
Method Detail

elementAt

public final int elementAt(int id)
get element at


get

public final int[] get()
extract underlying data


setElementAt

public final void setElementAt(int new_name,
                               int id)
set an element


set

public final void set(int[] new_items)
replace underlying data


keep_larger

public final void keep_larger(int master,
                              int child)

keep_smaller

public final void keep_smaller(int master,
                               int child)

clear

public final void clear()
clear the array


size

public final int size()
return the size+1 as in last item (so an array of 0 values is 1) if added If using set, use checkCapacity


getCapacity

public final int getCapacity()
return the sizeof array


removeElementAt

public final void removeElementAt(int id)
remove element at


deleteElementWithValue

public final void deleteElementWithValue(int id)
delete element at


toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

contains

public final boolean contains(int value)
see if value present


pull

public final int pull()
pull item from top as in LIFO stack


push

public final void push(int value)
put item at top as in LIFO stack


addElement

public final void addElement(int value)
add an item


add_together

public final void add_together(int master,
                               int child)

reuse

public final void reuse()
recycle the array by just resetting the pointer


trim

public void trim()

setSize

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


resetToCheckpoint

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


setCheckpoint

public void setCheckpoint()
used to rollback array to point