com.inxar.syntacs.util
Class ArrayIntArray

java.lang.Object
  |
  +--com.inxar.syntacs.util.ArrayIntArray
All Implemented Interfaces:
Cloneable, IntArray

public class ArrayIntArray
extends Object
implements IntArray

Concrete implementation of IntArray which uses an array internally.


Constructor Summary
ArrayIntArray(int[] src)
          Constructs a new ArrayIntArray wrapping the given int[].
 
Method Summary
 int at(int index)
          Returns the value at the given index.
 Object clone()
          Clones the IntArray.
 int length()
          Returns the length of the array.
 int[] toArray()
          Returns a new primitive-typed copy of the array.
 String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ArrayIntArray

public ArrayIntArray(int[] src)
Constructs a new ArrayIntArray wrapping the given int[].
Method Detail

at

public int at(int index)
Description copied from interface: IntArray
Returns the value at the given index.
Specified by:
at in interface IntArray

toArray

public int[] toArray()
Description copied from interface: IntArray
Returns a new primitive-typed copy of the array.
Specified by:
toArray in interface IntArray

length

public int length()
Description copied from interface: IntArray
Returns the length of the array.
Specified by:
length in interface IntArray

toString

public String toString()
Overrides:
toString in class Object

clone

public Object clone()
             throws CloneNotSupportedException
Description copied from interface: IntArray
Clones the IntArray.
Specified by:
clone in interface IntArray