public interface ValueGenerator<T> extends Typed<T>
| Modifier and Type | Interface and Description |
|---|---|
static class |
ValueGenerator.G2VG<T> |
static interface |
ValueGenerator.Src<T> |
static interface |
ValueGenerator.ValueMap |
static class |
ValueGenerator.VG2G<T> |
| Modifier and Type | Method and Description |
|---|---|
static <T> ValueGenerator.Src<T> |
constant(T value) |
static <T> ValueGenerator.Src<T> |
fromFunction(Function<? super ValueGenerator.ValueMap,? extends T> function) |
static <T> ValueGenerator<T> |
fromGenerator(Generator<? extends T> generator) |
static <T> ValueGenerator.Src<T> |
getKey(String key) |
default Class<T> |
getValueType()
Returns the type of values produced/contained by this instance.
|
default ValueGenerator<T> |
link(ValueSource.FactoryMap factoryMap) |
T |
next(ValueGenerator.ValueMap valueMap) |
default T |
next(ValueGenerator.ValueMap valueMap,
Function<ValueGenerator.ValueMap,ValueGenerator.ValueMap> transform)
If the value generator chooses to ignore the provided
valueMap,
it should pass its own value map to transform. |
static <T> ValueGenerator<T> |
nextKey(ValueSource.FactoryMap factoryMap,
String key) |
default <V,B> FactoriesSetup.ValueDeclaration<V,B> |
set(String key,
B builder) |
static <T> FlGenerator<T> |
toGenerator(ValueGenerator<T> generator,
ValueGenerator.ValueMap valueMap) |
T next(ValueGenerator.ValueMap valueMap)
default ValueGenerator<T> link(ValueSource.FactoryMap factoryMap)
default T next(ValueGenerator.ValueMap valueMap, Function<ValueGenerator.ValueMap,ValueGenerator.ValueMap> transform)
valueMap,
it should pass its own value map to transform.valueMap - transform - default <V,B> FactoriesSetup.ValueDeclaration<V,B> set(String key, B builder)
default Class<T> getValueType()
Typednull if the type is unknown;
should never return a primitive type.getValueType in interface Typed<T>static <T> ValueGenerator.Src<T> fromFunction(Function<? super ValueGenerator.ValueMap,? extends T> function)
static <T> ValueGenerator<T> fromGenerator(Generator<? extends T> generator)
static <T> FlGenerator<T> toGenerator(ValueGenerator<T> generator, ValueGenerator.ValueMap valueMap)
static <T> ValueGenerator.Src<T> constant(T value)
static <T> ValueGenerator<T> nextKey(ValueSource.FactoryMap factoryMap, String key)
static <T> ValueGenerator.Src<T> getKey(String key)
Copyright © 2019. All rights reserved.