Package org.harctoolbox.valuesets
Class ValueSet
java.lang.Object
org.harctoolbox.valuesets.ValueSet
- Direct Known Subclasses:
IterationValueSet
,RandomValueSet
,ShiftValueSet
,SingletonValueSet
A value set is either an single value or a way
of generating repetitions. These are implemented in subclasses.
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected static String
formatThing
(String prefix, int variable) static void
Just for testing purposes.static ValueSet
newValueSet
(Long protocolMin, Long protocolMax, String s) Factory method for parsing strings of iterations.void
reset()
Resets the iterator to virgin state.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, iterator, spliterator
-
Field Details
-
min
protected long min -
current
protected long current
-
-
Constructor Details
-
ValueSet
protected ValueSet(long min)
-
-
Method Details
-
formatThing
-
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
Just for testing purposes.- Parameters:
args
-
-
reset
public void reset()Resets the iterator to virgin state.
-