Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.port80.util.struct
Class IntList  view IntList download IntList.java

java.lang.Object
  extended bycom.port80.util.struct.IntList

public class IntList
extends java.lang.Object


Field Summary
private  int capacity
           
static int CAPACITY
           
private  int[] list
           
private  int size
           
 
Constructor Summary
IntList()
           
IntList(int cap)
           
 
Method Summary
 void add(int v)
           
 int binarySearch(int x)
           
 void clear()
           
private  void expand()
           
 int get(int index)
           
 int insertionIndex(int x)
           
static void main(java.lang.String[] args)
           
 void pack()
           
 void remove(int index)
           
 void set(int index, int value)
           
 int size()
           
 void sort()
           
 int[] toArray()
           
 java.lang.String toString()
          Convert this Object to a human-readable String.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

CAPACITY

public static final int CAPACITY
See Also:
Constant Field Values

list

private int[] list

capacity

private int capacity

size

private int size
Constructor Detail

IntList

public IntList()

IntList

public IntList(int cap)
Method Detail

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)