Package digilib.util
Class NumRange
- java.lang.Object
-
- digilib.util.NumRange
-
public class NumRange extends Object implements Iterable<Integer>
Class that parses String with intervals into Iterable sequence of integers. Intervals are separated by comma ','. An interval is a range represented by two numbers and a hyphen e.g. "3-6". If the second number is omitted the interval goes to maxnum. An interval can also consist of a single number e.g. "7". Valid NumRanges: "1-10,13-20", "3,5,9", "1-".- Author:
- casties
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getEnd()
int
getStart()
Iterator<Integer>
iterator()
void
parseString(String pages)
void
setMaxnum(Integer maxnum)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
-