Package org.daisy.braille.pef
Class Range
java.lang.Object
org.daisy.braille.pef.Range
Provides a range data object.
- Author:
- Joel HÃ¥kansson
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
inRange
(int value) Test if a value is in rangestatic Range
parseRange
(String range) Parses the string as a range
-
Constructor Details
-
Range
public Range(int from, int to) Create a new range.- Parameters:
from
- first page, inclusiveto
- last page, inclusive
-
Range
public Range(int from) Create a new range.- Parameters:
from
- first page, inclusive
-
-
Method Details
-
parseRange
Parses the string as a range- Parameters:
range
-- Returns:
- returns a Range object
- Throws:
NumberFormatException
- if the range cannot be parsed
-
inRange
public boolean inRange(int value) Test if a value is in range- Parameters:
value
-- Returns:
- returns true if value is in range, false otherwise
-