Class IndexRange
Object
com.owenfeehan.pathpatternfinder.trim.constantsubstring.IndexRange
public class IndexRange extends Object
A range of indices in an array.
- Author:
- Owen Feehan
- 
Constructor SummaryConstructors Constructor Description IndexRange(int startIndex, int length)Create for a given starting-index and length.
- 
Method SummaryModifier and Type Method Description intgetEndIndexExclusive()The end index (exclusive) of the range.intgetLength()How many items are in the range.intgetStartIndex()The index the range begins at.
- 
Constructor Details- 
IndexRangepublic IndexRange(int startIndex, int length)Create for a given starting-index and length.- Parameters:
- startIndex- the index the range begins at.
- length- how many items are in the range.
 
 
- 
- 
Method Details- 
getStartIndexpublic int getStartIndex()The index the range begins at.- Returns:
- the index
 
- 
getLengthpublic int getLength()How many items are in the range.- Returns:
- the number of items in the range.
 
- 
getEndIndexExclusivepublic int getEndIndexExclusive()The end index (exclusive) of the range.- Returns:
- an index can be used as an upper-bound on the range, but doesn't itself exist as an element.
 
 
-