Package 

Class SParser.IntegerRanges

  • All Implemented Interfaces:
    java.lang.Iterable

    
    public class SParser.IntegerRanges
     implements Iterable<Integer>
                        

    A class that represents a set of positive integer ranges. It parsesstrings of the form: "2-3,5,7-" where ranges are separated by comma andthe lower/upper bounds are separated by dash. Either the lower or upperbound may be omitted meaning all values up to or over. So the stringabove means 2, 3, 5, and 7, 8, 9, ...

    • Method Summary

      Modifier and Type Method Description
      boolean isIncluded(int value) Is the given value in the set of ranges
      boolean isEmpty()
      String toString()
      Iterator<Integer> iterator()
      • Methods inherited from class java.lang.Iterable

        forEach, iterator, spliterator
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • SParser.IntegerRanges

        SParser.IntegerRanges()
      • SParser.IntegerRanges

        SParser.IntegerRanges(String newValue)