public class Range
extends Object
A class to represent start and end values.
-
Field Summary
Fields
final int
final int
final int
final int
-
Constructor Summary
Constructors
Range(int aStart,
int anEnd)
Creates a range with start/end.
Range(int aStart,
int anEnd,
int anAnchor)
Creates a range, with start/end/anchor.
-
Method Summary
int
int
int
boolean
Returns whether range is empty.
Standard toString implementation.
-
Field Details
-
start
public final int start
-
-
length
public final int length
-
anchor
public final int anchor
-
Constructor Details
-
Range
public Range(int aStart,
int anEnd)
Creates a range with start/end.
-
Range
public Range(int aStart,
int anEnd,
int anAnchor)
Creates a range, with start/end/anchor.
-
Method Details
-
getStart
public int getStart()
Returns the start.
-
getEnd
public int getEnd()
Returns the end.
-
getLength
public int getLength()
Returns the length.
-
isEmpty
public boolean isEmpty()
Returns whether range is empty.
-
toString
Standard toString implementation.
- Overrides:
toString
in class Object