Class Range
java.lang.Object
ca.phon.util.Range
- All Implemented Interfaces:
Serializable,Iterable<Integer>
An iterable integer range.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancontains(int val) booleanstatic RangefromString(String rangeStr) Parse a string into a range object.intgetEnd()intgetFirst()intgetLast()intgetRange()intgetStart()inthashCode()booleaniterator()static voidbooleanreduceRanges(List<Range> ranges) This method takes a list of ranges and attempts to reduce them.voidsetEnd(int end) voidsetExcludesEnd(boolean excludesEnd) voidsetStart(int start) toString()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
Range
public Range() -
Range
public Range(int start, int end) -
Range
public Range(int start, int end, boolean excludesEnd)
-
-
Method Details
-
getStart
public int getStart() -
setStart
public void setStart(int start) -
getEnd
public int getEnd() -
getRange
public int getRange() -
setEnd
public void setEnd(int end) -
isExcludesEnd
public boolean isExcludesEnd() -
getFirst
public int getFirst() -
getLast
public int getLast() -
setExcludesEnd
public void setExcludesEnd(boolean excludesEnd) -
hashCode
-
iterator
-
overlaps
-
contains
-
contains
public boolean contains(int val) -
intersect
-
main
-
toString
-
fromString
-
reduceRanges
-