Class Range

java.lang.Object
org.daisy.braille.pef.Range

public class Range extends Object
Provides a range data object.
Author:
Joel HÃ¥kansson
  • Constructor Details

    • Range

      public Range(int from, int to)
      Create a new range.
      Parameters:
      from - first page, inclusive
      to - last page, inclusive
    • Range

      public Range(int from)
      Create a new range.
      Parameters:
      from - first page, inclusive
  • Method Details

    • parseRange

      public static Range parseRange(String range)
      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