org.apache.xalan.xsltc.util
Class IntegerArray
java.lang.Object
org.apache.xalan.xsltc.util.IntegerArray
- All Implemented Interfaces:
- java.lang.Cloneable
public final class IntegerArray
- extends java.lang.Object
- implements java.lang.Cloneable
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
InitialSize
private static final int InitialSize
- See Also:
- Constant Field Values
_array
private int[] _array
_size
private int _size
_free
private int _free
IntegerArray
public IntegerArray()
IntegerArray
public IntegerArray(int size)
IntegerArray
public IntegerArray(int[] array)
clear
public void clear()
clone
public java.lang.Object clone()
- Overrides:
clone
in class java.lang.Object
toIntArray
public int[] toIntArray()
at
public final int at(int index)
set
public final void set(int index,
int value)
indexOf
public int indexOf(int n)
add
public final void add(int value)
addNew
public void addNew(int value)
- Adds new int at the end if not already present.
reverse
public void reverse()
merge
public void merge(IntegerArray other)
- Merge two sorted arrays and eliminate duplicates.
Elements of the other IntegerArray must not be changed.
sort
public void sort()
quicksort
private static void quicksort(int[] array,
int p,
int r)
partition
private static int partition(int[] array,
int p,
int r)
growArray
private void growArray(int size)
popLast
public int popLast()
last
public int last()
setLast
public void setLast(int n)
pop
public void pop()
pop
public void pop(int n)
cardinality
public final int cardinality()
print
public void print(java.io.PrintStream out)