public interface InputGenerator<T>
Modifier and Type | Method and Description |
---|---|
java.util.List<java.lang.Class<T>> |
getGeneratedTypes()
Returns the list of classes of which type the generated types are.
|
Input<T> |
getInputFromReader(java.io.Reader reader,
char separator)
Gets a reader input generator from the given reader.
|
Input<T> |
getInputFromUser(javax.swing.JPanel panel)
Gets an input generator taking input from the user.
|
MixedInput<T> |
getMixedInput(java.util.List<Input<T>> inputs)
Gets an input which mixes the given inputs,
|
default Input<T> |
getMixedInputUntyped(java.util.List<Input<?>> inputs)
Untyped version of
getMixedInput(List) , for the case when the actual
generic type is unknown. |
default Input<T> |
getRandomInput(Bound<T> bound)
Gets an input generator generating random input from a single bound.
|
Input<T> |
getRandomInput(java.util.List<Bound<T>> bounds)
Gets an input generator generating random input from multiple bounds.
|
default Input<T> |
getRandomInputUntyped(java.util.List<Bound<?>> bounds)
Untyped version of
getRandomInput(List) , for the case when the actual
generic type is unknown. |
Input<T> getInputFromUser(javax.swing.JPanel panel)
panel
- The panel to use to ask the user to supply input. Implementations
are allowed to ignore this parameter and ask the user for input in different ways.default Input<T> getRandomInput(Bound<T> bound)
bound
- The bound generating the random input.Input<T> getRandomInput(java.util.List<Bound<T>> bounds)
bounds
- The bounds generating the random input.java.lang.IllegalArgumentException
- If the list of bounds is empty.default Input<T> getRandomInputUntyped(java.util.List<Bound<?>> bounds)
getRandomInput(List)
, for the case when the actual
generic type is unknown. The bounds must still be of the same generic type as the generator to
ensure correct functionality. Whenever possible, use the typed version.Input<T> getInputFromReader(java.io.Reader reader, char separator)
reader
- The reader to get the input from. Each line in the reader is considered to contain a separate input list.separator
- The separator separating different entries within the same line.MixedInput<T> getMixedInput(java.util.List<Input<T>> inputs)
inputs
- The inputs which should be mixed.default Input<T> getMixedInputUntyped(java.util.List<Input<?>> inputs)
getMixedInput(List)
, for the case when the actual
generic type is unknown. The inputs must still be of the same generic type as the generator to
ensure correct functionality. Whenever possible, use the typed version.java.util.List<java.lang.Class<T>> getGeneratedTypes()