public abstract class ConfigValueBuilder<T,B extends ConfigValueBuilder<T,B>>
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
ConfigValueBuilder.Aggregate<A,E> |
static class |
ConfigValueBuilder.Scalar<T> |
| Modifier and Type | Field and Description |
|---|---|
protected java.util.List<Constraint<? super T>> |
constraintList |
protected java.lang.Class<T> |
type |
| Modifier and Type | Method and Description |
|---|---|
static <C extends java.util.Collection<E>,E> |
aggregate(java.lang.Class<? super C> collectionType,
java.lang.Class<E> componentType) |
static <E> ConfigValueBuilder.Aggregate<E[],E> |
aggregate(java.lang.Class<E[]> arrayType) |
ConfigValue<T> |
build() |
abstract ConstraintsBuilder<B,T,?> |
constraints() |
static boolean |
isAggregate(java.lang.Class<?> type)
Determines if a
Class object represents an aggregate type,
ie. |
static <T> ConfigValueBuilder.Scalar<T> |
scalar(java.lang.Class<T> type) |
protected B |
self() |
B |
setFinal() |
B |
setFinal(boolean isFinal) |
B |
withComment(java.lang.String comment) |
B |
withDefaultValue(T defaultValue) |
B |
withListener(java.util.function.BiConsumer<T,T> consumer) |
B |
withName(java.lang.String name) |
B |
withParent(Node node)
Sets the node that the built
ConfigValue will be registered to. |
@Nonnull protected final java.lang.Class<T> type
protected java.util.List<Constraint<? super T>> constraintList
public static boolean isAggregate(java.lang.Class<?> type)
Class object represents an aggregate type,
ie. if it is an Array or a Collection.type - the type to checktrue if type is an aggregate type;
false otherwisepublic static <E> ConfigValueBuilder.Aggregate<E[],E> aggregate(@Nonnull java.lang.Class<E[]> arrayType)
public static <C extends java.util.Collection<E>,E> ConfigValueBuilder.Aggregate<C,E> aggregate(@Nonnull java.lang.Class<? super C> collectionType, @Nonnull java.lang.Class<E> componentType)
public static <T> ConfigValueBuilder.Scalar<T> scalar(java.lang.Class<T> type)
public B withName(java.lang.String name)
public B withComment(java.lang.String comment)
public B setFinal()
public B setFinal(boolean isFinal)
public B withParent(Node node)
ConfigValue will be registered to.node - The node this ConfigValue will be registered to.protected final B self()
public abstract ConstraintsBuilder<B,T,?> constraints()
public ConfigValue<T> build()