public class Range extends Object
| Modifier and Type | Field and Description |
|---|---|
int |
length
The number of items in the range.
|
int |
location
The start index of the range.
|
| Constructor and Description |
|---|
Range(int location,
int length)
Creates a new range with the specified start index and number of items.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
contains(int location)
Returns a boolean value indicating whether or not the specified location is in this range.
|
public int length
public int location
public Range(int location,
int length)
location - The start index of the range.length - The number of items in the range. May be 0 to indicate an empty range.public boolean contains(int location)
this.location and less than this.location +
this.length.location - the location to test.