public final class IndexRange extends Object
Index range is a integer range, with an exception being that it can accept only start, which then is being considered a single index, without being a range.
Usage examples can be found in ArgumentHolder
Constructor and Description |
---|
IndexRange(int index) |
IndexRange(int start,
int end) |
Modifier and Type | Method and Description |
---|---|
int |
getEnd()
Returns the ending index of the range, or if it's not a range -
-1 |
int |
getIndex()
Returns the index if this object doesn't represent a range, or the starting index if this
object is holding a range.
|
int |
getStart()
Returns the starting index of the range, or if it's not a range - the index.
|
boolean |
isRange()
Returns whether or not this index range is a range.
|
public IndexRange(int start, int end)
public IndexRange(int index)
public boolean isRange()
public int getIndex()
public int getStart()
public int getEnd()
-1
Copyright © 2020. All rights reserved.