Class ValueSet

java.lang.Object
org.harctoolbox.valuesets.ValueSet
All Implemented Interfaces:
Iterable<Long>
Direct Known Subclasses:
IterationValueSet, RandomValueSet, ShiftValueSet, SingletonValueSet

public abstract class ValueSet extends Object implements Iterable<Long>
A value set is either an single value or a way of generating repetitions. These are implemented in subclasses.
  • Field Details

    • min

      protected long min
    • current

      protected long current
  • Constructor Details

    • ValueSet

      protected ValueSet(long min)
  • Method Details

    • formatThing

      protected static String formatThing(String prefix, int variable)
    • newValueSet

      public static ValueSet newValueSet(Long protocolMin, Long protocolMax, String s) throws ParseException, org.harctoolbox.irp.NameUnassignedException
      Factory method for parsing strings of iterations.
      Parameters:
      protocolMin - Protocol min value, or null if unknown,
      protocolMax - Protocol max value, or null if unknown.
      s - String to be parsed describing the iteration.
      Returns:
      ValueSet
      Throws:
      org.harctoolbox.irp.NameUnassignedException - if protocolMin == null or protocolMax == null and iteration uses # or *.
      ParseException - unparseable s argument.
    • main

      public static void main(String[] args)
      Just for testing purposes.
      Parameters:
      args -
    • reset

      public void reset()
      Resets the iterator to virgin state.