DuplicatesGTRec
, GTRec
, RefGTRec
BitSetGT
, CharArray
, IndexArray
, LowMafRefDiallelicGT
, LowMafRefGT
, PackedIntArray
, SeqCodedRefGT
, UnsignedByteArray
, VcfRecord
, WrappedIntArray
public interface IntArray
Interface IntArray
represents an immutable int[]
array.
IntArray
are required to be immutable.Modifier and Type | Method | Description |
---|---|---|
static java.lang.String |
asString(IntArray ia) |
Returns a string representation of this
IntArray by applying
java.utils.Arrays.toString() to an equivalent int[]
object. |
static IntArray |
create(int[] ia,
int valueSize) |
Returns a new
IntArray instance that has the same
sequence of integers as the specified array. |
static IntArray |
create(IntList il,
int valueSize) |
Returns a new
IntArray instance that has the same
sequence of integers as the specified list. |
static boolean |
equals(IntArray a,
IntArray b) |
Returns
true if the specified IntArray objects
represent the same sequence of integer values, and returns false
otherwise. |
int |
get(int index) |
Returns the specified array element.
|
static int |
max(IntArray ia) |
Returns the maximum element, or
Integer.MIN_VALUE if
this.size() == 0 . |
static int |
min(IntArray ia) |
Returns the minimum element, or
Integer.MAX_VALUE if
this.size() == 0 . |
int |
size() |
Returns the number of elements in this
IntArray . |
static int[] |
toArray(IntArray ia) |
Returns a copy of the specified array.
|
int size()
IntArray
.IntArray
int get(int index)
index
- an array indexjava.lang.IndexOutOfBoundsException
- if
index < 0 || index >= this.size()
static int[] toArray(IntArray ia)
ia
- a list of integersjava.lang.NullPointerException
- if ia == null
static java.lang.String asString(IntArray ia)
IntArray
by applying
java.utils.Arrays.toString()
to an equivalent int[]
object.ia
- a list of integersIntArray
.java.lang.NullPointerException
- if ia == null
static boolean equals(IntArray a, IntArray b)
true
if the specified IntArray
objects
represent the same sequence of integer values, and returns false
otherwise.a
- a sequence of integer valuesb
- a sequence of integer valuestrue
if the specified IntArray
objects
represent the same sequence of integer valuesstatic int max(IntArray ia)
Integer.MIN_VALUE
if
this.size() == 0
.ia
- a list of integersjava.lang.NullPointerException
- if ia == null
static int min(IntArray ia)
Integer.MAX_VALUE
if
this.size() == 0
.ia
- a list of integersjava.lang.NullPointerException
- if ia == null
static IntArray create(int[] ia, int valueSize)
IntArray
instance that has the same
sequence of integers as the specified array.ia
- the array of integers to be copiedvalueSize
- the exclusive end of the range of non-negative
array valuesIntArray
instance that has
the same sequence of integers as the specified arrayjava.lang.IllegalArgumentException
- if valueSize < 1
java.lang.IllegalArgumentException
- if
(ia[j] < 0 || ia[j] > valueSize)
for any index j
satisfying (j >= 0 && j < ia.length)
java.lang.NullPointerException
- if ia == null
static IntArray create(IntList il, int valueSize)
IntArray
instance that has the same
sequence of integers as the specified list.il
- the list of integers to be copiedvalueSize
- the exclusive end of the range of non-negative
array valuesIntArray
instance that has
the same sequence of integers as the specified listjava.lang.IllegalArgumentException
- if valueSize < 1
java.lang.IllegalArgumentException
- if
(ia[j] < 0 || ia[j] > valueSize)
for any index j
satisfying (j >= 0 && j < ia.length)
java.lang.NullPointerException
- if ia == null