ByteArray, CharArray, UnsignedByteArray, WrappedIntArraypublic interface IntArray
Interface IntArray represents an immutable int[] array.
IntArray are required to be immutable.| Modifier and Type | Method | Description |
|---|---|---|
default java.lang.String |
asString() |
Returns a string representation of this
IntArray by applying
java.utils.Arrays.toString() to an equivalent int[]
object. |
static IntArray |
create(int[] ia,
int start,
int end) |
Returns a new
IntArray instance that has the same
sequence of integers as the specified array. |
static IntArray |
create(IntList il,
int start,
int end) |
Returns a new
IntArray instance that has the same
sequence of integers as the specified list. |
int |
get(int index) |
Returns the specified array element.
|
default int |
max() |
Returns the maximum element, or
Integer.MIN_VALUE if
this.size() == 0. |
default int |
min() |
Returns the minimum element, or
Integer.MAX_VALUE if
this.size() == 0. |
int |
size() |
Returns the number of elements in this
IntArray. |
java.lang.String |
toString() |
Returns a string representation of this
IntArray by applying
java.utils.Arrays.toString() to an equivalent int[]
object. |
int size()
IntArray.IntArrayint get(int index)
index - an array indexjava.lang.IndexOutOfBoundsException - if
index < 0 || index >= this.size()default int max()
Integer.MIN_VALUE if
this.size() == 0.default int min()
Integer.MAX_VALUE if
this.size() == 0.java.lang.String toString()
IntArray by applying
java.utils.Arrays.toString() to an equivalent int[]
object.toString in class java.lang.ObjectIntArraydefault java.lang.String asString()
IntArray by applying
java.utils.Arrays.toString() to an equivalent int[]
object.IntArray.static IntArray create(int[] ia, int start, int end)
IntArray instance that has the same
sequence of integers as the specified array.ia - the array of integers to be copiedstart - the exclusive start of an interval containing the values
in the arrayend - the exclusive end of an interval containing the values
in the arrayIntArray instance that has
the same sequence of integers as the specified arrayjava.lang.IllegalArgumentException - if start >= endjava.lang.IllegalArgumentException - if an out-of-range
element is detectedjava.lang.NullPointerException - if ia == nullstatic IntArray create(IntList il, int start, int end)
IntArray instance that has the same
sequence of integers as the specified list.il - the list of integers to be copiedstart - the exclusive start of an interval containing the values
in the listend - the exclusive end of an interval containing the values
in the listIntArray instance that has
the same sequence of integers as the specified listjava.lang.IllegalArgumentException - if start >= endjava.lang.IllegalArgumentException - if an out-of-range
element is detectedjava.lang.NullPointerException - if il == null