Package ints
Class WrappedIntArray
- java.lang.Object
-
- ints.WrappedIntArray
-
-
Constructor Summary
Constructors Constructor Description WrappedIntArray(int[] ia)Constructs a newWrappedIntArrayinstance.WrappedIntArray(int[] ia, int valueSize)Constructs a newWrappedIntArrayinstance.WrappedIntArray(IntList il)Constructs a newWrappedIntArrayinstance.WrappedIntArray(IntList il, int valueSize)Constructs a newWrappedIntArrayinstance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intget(int index)Returns the specified array element.intsize()Returns the number of elements in thisIntArray.java.lang.StringtoString()
-
-
-
Constructor Detail
-
WrappedIntArray
public WrappedIntArray(int[] ia)
Constructs a newWrappedIntArrayinstance.- Parameters:
ia- an array of integers- Throws:
java.lang.NullPointerException- ifia == null
-
WrappedIntArray
public WrappedIntArray(int[] ia, int valueSize)Constructs a newWrappedIntArrayinstance.- Parameters:
ia- an array of integersvalueSize- the exclusive end of the range of non-negative array values- Throws:
java.lang.IllegalArgumentException- if(ia[j] < 0 || ia[j] > valueSize)for any indexjsatisfying(j >= 0 && j < ia.length)java.lang.NullPointerException- ifia == null
-
WrappedIntArray
public WrappedIntArray(IntList il)
Constructs a newWrappedIntArrayinstance.- Parameters:
il- a list of integers- Throws:
java.lang.NullPointerException- ifil == null
-
WrappedIntArray
public WrappedIntArray(IntList il, int valueSize)
Constructs a newWrappedIntArrayinstance.- Parameters:
il- a list of integersvalueSize- the exclusive end of the range of non-negative array values- Throws:
java.lang.IllegalArgumentException- if(il[j] < 0 || il[j] > valueSize)for any indexjsatisfying(j >= 0 && j < il.length)java.lang.NullPointerException- ifil == null
-
-
Method Detail
-
size
public int size()
Description copied from interface:IntArrayReturns the number of elements in thisIntArray.
-
get
public int get(int index)
Description copied from interface:IntArrayReturns the specified array element.
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-