java.lang.Object
com.port80.util.struct.IntList
- public class IntList
- extends java.lang.Object
CAPACITY
public static final int CAPACITY
- See Also:
- Constant Field Values
list
private int[] list
capacity
private int capacity
size
private int size
IntList
public IntList()
IntList
public IntList(int cap)
add
public void add(int v)
set
public void set(int index,
int value)
throws java.lang.IndexOutOfBoundsException
get
public int get(int index)
remove
public void remove(int index)
size
public int size()
toArray
public int[] toArray()
sort
public void sort()
binarySearch
public int binarySearch(int x)
insertionIndex
public int insertionIndex(int x)
pack
public void pack()
clear
public void clear()
toString
public java.lang.String toString()
- Description copied from class:
java.lang.Object
- Convert this Object to a human-readable String.
There are no limits placed on how long this String
should be or what it should contain. We suggest you
make it as intuitive as possible to be able to place
it into System.out.println() 55
and such.
It is typical, but not required, to ensure that this method
never completes abruptly with a java.lang.RuntimeException.
This method will be called when performing string
concatenation with this object. If the result is
null, string concatenation will instead
use "null".
The default implementation returns
getClass().getName() + "@" +
Integer.toHexString(hashCode()).
expand
private void expand()
main
public static void main(java.lang.String[] args)