|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjal.bytes.Range
A range of values within an array, consisting of the array, the index of
the first element in the range, and an index one past the range. The
notation is [first, last)
, indicating that
array[first]
is part of the range but
array[last]
is not. The range [n, n)
is a
valid range that contains zero elements, while
the range [n, n-1)
is invalid.
Note that operations on a Range object do not actually change any array elements. A Range is simply a way of describing a set of values.
Copyright © 1996
Silicon Graphics, Inc.
Permission to use, copy, modify, distribute and sell this software
and its documentation for any purpose is hereby granted without fee,
provided that the above copyright notice appear in all copies and
that both that copyright notice and this permission notice appear
in supporting documentation. Silicon Graphics makes no
representations about the suitability of this software for any
purpose. It is provided "as is" without express or
implied warranty.
Field Summary | |
byte[] |
array
Array containing the range. |
int |
first
Index of the first element in the range. |
int |
last
Index that is one past the last element in the range. |
Constructor Summary | |
Range(byte[] array)
Constructs a Range that represents an entire array. |
|
Range(byte[] array,
int first,
int last)
Constructs a Range. |
Method Summary | |
String |
toString()
Creates a string representation of this Range. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public byte[] array
public int first
public int last
Constructor Detail |
public Range(byte[] array, int first, int last)
array
- Array containing the rangefirst
- Index of the first element in the rangelast
- Index that is one past the last element in the rangepublic Range(byte[] array)
Range(array, 0, array.length)
.
array
- Array containing the rangeMethod Detail |
public String toString()
[first, last)
".
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |