Constructor | Description |
---|---|
CharArray(byte[] ba) |
Constructs a new
CharArray instance from the specified data. |
CharArray(char[] ca) |
Constructs a new
CharArray instance from
the specified data. |
CharArray(int[] ia) |
Constructs a new
CharArray instance from the specified data. |
CharArray(int[] ia,
int valueSize) |
Constructs a new
CharArray instance from the specified data. |
CharArray(int[] ia,
int to,
int from) |
Constructs a new
CharArray instance from the
specified data. |
CharArray(IntList il) |
Constructs a new
UnsignedByteArray instance from the specified data. |
CharArray(IntList il,
int valueSize) |
Constructs a new
CharArray instance from the specified data. |
CharArray(IntList il,
int from,
int to) |
Constructs a new
CharArray instance from the specified data. |
Modifier and Type | Method | Description |
---|---|---|
int |
get(int index) |
Returns the specified array element.
|
int |
size() |
Returns the number of elements in this
IntArray . |
public CharArray(byte[] ba)
CharArray
instance from the specified data.
The array of bytes is interpreted as a stream of characters with
the high byte preceding the low byte.ba
- an array of char values expressed as pairs of bytes.java.lang.IllegalArgumentException
- if (ba.length % 1) != 0
java.lang.NullPointerException
- if ca == null
public CharArray(char[] ca)
CharArray
instance from
the specified data.ca
- an array of integer values between 0 and Character.MAX_VALUE
inclusivejava.lang.NullPointerException
- if ca == null
public CharArray(int[] ia)
CharArray
instance from the specified data.ia
- an array of integersjava.lang.IllegalArgumentException
- if
(ia[j] < 0 || ia[j] > Character.MAX_VALUE)
for any index
j
satisfying (j >= from && j < to)
java.lang.NullPointerException
- if ia == null
public CharArray(IntList il)
UnsignedByteArray
instance from the specified data.il
- an list of integer values between 0 and
Character.MAX_VALUE
inclusivejava.lang.IllegalArgumentException
- if
(il.get(j) < 0 || il.get(j) > Character.MAX_VALUE)
for any index
j
satisfying (j >= 0 && j < il.size())
java.lang.NullPointerException
- if il == null
public CharArray(int[] ia, int valueSize)
CharArray
instance from the specified data.ia
- an array of nonnegative integersvalueSize
- the exclusive end of the range of non-negative
array valuesjava.lang.IllegalArgumentException
- if
(valueSize < 1) || (valueSize >= (Character.MAX_VALUE + 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
public CharArray(IntList il, int valueSize)
CharArray
instance from the specified data.il
- an list of nonnegative integervalueSize
- the exclusive end of the range of non-negative
array valuesjava.lang.IllegalArgumentException
- if
(valueSize < 1) || (valueSize >= (Character.MAX_VALUE + 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 il == null
public CharArray(int[] ia, int to, int from)
CharArray
instance from the
specified data.ia
- an array of integer values between 0 and
Character.MAX_VALUE
inclusiveto
- the first element to be included (inclusive)from
- the last element to be included (exclusive)java.lang.IllegalArgumentException
- if
(ia[j] < 0 || ia[j] > Character.MAX_VALUE)
for any index
j
satisfying (j >= from && j < to)
java.lang.IndexOutOfBoundsException
- if (from < 0 || to > ia.length)
java.lang.NegativeArraySizeException
- if to > from
java.lang.NullPointerException
- if ia == null
public CharArray(IntList il, int from, int to)
CharArray
instance from the specified data.il
- an list of integer values between 0 and
Character.MAX_VALUE
inclusivefrom
- the first element to be included (inclusive)to
- the last element to be included (exclusive)java.lang.IllegalArgumentException
- if
(il.get(j) < 0 || il.get(j) > Character.MAX_VALUE)
for any index j
satisfying (j >= from && j < to)
java.lang.IndexOutOfBoundsException
- if from < 0 || to > il.length
java.lang.NegativeArraySizeException
- if to > from
java.lang.NullPointerException
- if il == null
public int size()
IntArray
IntArray
.