public interface IntSequence
int values, providing uniform, read-only access to such values.
This is intended to be the equivalent of CharSequence, but for Integer.TYPE instead of
Character.TYPE.| Modifier and Type | Method and Description |
|---|---|
int |
intAt(int index)
Returns the
int value at the specified index. |
int |
length()
Returns the length of this integer sequence.
|
IntSequence |
subSequence(int start,
int end)
Returns a new
IntSequence that is a subsequence of this sequence. |
int[] |
toArray()
Returns a copy of the internal array containing the
ints in this sequence in the same order as this
sequence. |
int length()
ints in this sequence.int intAt(int index)
int value at the specified index.
An index ranges from zero to length() - 1.
The first int value of the sequence is at index zero, the next at index one, and so on, as for array
indexing.index - The index of the int value to be returned.int value.java.lang.IndexOutOfBoundsException - If the index argument is negative or not less than length().IntSequence subSequence(int start, int end)
IntSequence that is a subsequence of this sequence.
The subsequence starts with the int value at the specified index and ends with the int value at
index end - 1.
The length (in ints) of the returned sequence is end - start, so if start == end
then an empty sequence is returned.start - The start index, inclusive.end - The end index, exclusive.java.lang.IndexOutOfBoundsException - If start or end are negative, if end is greater
than length(), or if start is greater than endint[] toArray()
ints in this sequence in the same order as this
sequence. The length of the array will be the length of this sequence.This documentation was created 2017-01-24 at 21:26 GMT by The aXSL Group and may be freely copied. See license for details.