org.skunk.util
Class GappedIntArray

java.lang.Object
  |
  +--org.skunk.util.GappedIntArray

public class GappedIntArray
extends java.lang.Object

a container for ints that keeps a gap in the array


Constructor Summary
GappedIntArray()
           
GappedIntArray(int[] initialContent)
           
GappedIntArray(int gapSize, int gapOffset, int[] initialContent)
           
 
Method Summary
 void append(int[] someInts)
           
 int get(int offset)
           
 int[] get(int offset, int length)
           
 int getCurrentGapSize()
           
 int getGapOffset()
           
 void insertAt(int offset, int[] someInts)
           
 int length()
           
static void main(java.lang.String[] args)
           
 void remove(int offset, int len)
           
 void set(int offset, int anInt)
           
 void set(int offset, int[] someInts)
           
 int[] toIntArray()
           
 java.lang.String toString()
           
static java.lang.String toString(int[] array)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

GappedIntArray

public GappedIntArray()

GappedIntArray

public GappedIntArray(int[] initialContent)

GappedIntArray

public GappedIntArray(int gapSize,
                      int gapOffset,
                      int[] initialContent)
Method Detail

length

public int length()

get

public int get(int offset)
        throws java.lang.ArrayIndexOutOfBoundsException

get

public int[] get(int offset,
                 int length)
          throws java.lang.ArrayIndexOutOfBoundsException

append

public void append(int[] someInts)

set

public void set(int offset,
                int anInt)

set

public void set(int offset,
                int[] someInts)
         throws java.lang.ArrayIndexOutOfBoundsException

remove

public void remove(int offset,
                   int len)

getGapOffset

public int getGapOffset()

getCurrentGapSize

public int getCurrentGapSize()

insertAt

public void insertAt(int offset,
                     int[] someInts)

toIntArray

public int[] toIntArray()

toString

public static java.lang.String toString(int[] array)

toString

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

main

public static void main(java.lang.String[] args)