@Generated(value="org.immutables.processor.ProxyProcessor") public final class ImmutableParameter<T> extends Object implements Parameter<T>
Parameter.
Use the builder to create immutable instances:
ImmutableParameter.builder().
Use the static factory method to create immutable instances:
ImmutableParameter.of().
| Modifier and Type | Class and Description |
|---|---|
static class |
ImmutableParameter.Builder<T>
Builds instances of type
ImmutableParameter. |
| Modifier and Type | Method and Description |
|---|---|
static <T> ImmutableParameter.Builder<T> |
builder()
Creates a builder for
ImmutableParameter. |
static <T> ImmutableParameter<T> |
copyOf(Parameter<T> instance)
Creates an immutable copy of a
Parameter value. |
boolean |
equals(Object another)
This instance is equal to all instances of
ImmutableParameter that have equal attribute values. |
int |
hashCode()
Computes a hash code from attributes:
type, isLazy, validators. |
boolean |
isLazy()
Set to true, the parameter will not be evaluated in advance, but the corresponding
ASTNode will be passed as a parameter value. |
static <T> ImmutableParameter<T> |
of(Class<T> type)
Construct a new immutable
Parameter instance. |
String |
toString()
Prints the immutable value
Parameter with attribute values. |
Class<T> |
type() |
List<ParameterValidator<T>> |
validators() |
ImmutableParameter<T> |
withIsLazy(boolean value)
Copy the current immutable object by setting a value for the
isLazy attribute. |
ImmutableParameter<T> |
withType(Class<T> value)
Copy the current immutable object by setting a value for the
type attribute. |
ImmutableParameter<T> |
withValidators(Iterable<? extends ParameterValidator<T>> elements)
Copy the current immutable object with elements that replace the content of
validators. |
ImmutableParameter<T> |
withValidators(ParameterValidator<T>... elements)
Copy the current immutable object with elements that replace the content of
validators. |
clone, finalize, getClass, notify, notifyAll, wait, wait, waitlazyWith, validate, validationErrorpublic boolean isLazy()
ASTNode will be passed as a parameter value.public List<ParameterValidator<T>> validators()
validators in interface Parameter<T>validators attributepublic final ImmutableParameter<T> withType(Class<T> value)
type attribute.
A shallow reference equality check is used to prevent copying of the same value by returning this.value - A new value for typethis objectpublic final ImmutableParameter<T> withIsLazy(boolean value)
isLazy attribute.
A value equality check is used to prevent copying of the same value by returning this.value - A new value for isLazythis object@SafeVarargs public final ImmutableParameter<T> withValidators(ParameterValidator<T>... elements)
validators.elements - The elements to setthis objectpublic final ImmutableParameter<T> withValidators(Iterable<? extends ParameterValidator<T>> elements)
validators.
A shallow reference equality check is used to prevent copying of the same value by returning this.elements - An iterable of validators elements to setthis objectpublic boolean equals(Object another)
ImmutableParameter that have equal attribute values.public int hashCode()
type, isLazy, validators.public String toString()
Parameter with attribute values.public static <T> ImmutableParameter<T> of(Class<T> type)
Parameter instance.public static <T> ImmutableParameter<T> copyOf(Parameter<T> instance)
Parameter value.
Uses accessors to get values to initialize the new immutable instance.
If an instance is already immutable, it is returned as is.T - generic parameter Tinstance - The instance to copypublic static <T> ImmutableParameter.Builder<T> builder()
ImmutableParameter.
ImmutableParameter.<T>builder()
.type(Class<T>) // required type
.isLazy(boolean) // optional isLazy
.addValidators|addAllValidators(de.flapdoodle.eval.core.validation.ParameterValidator<T>) // validators elements
.build();
T - generic parameter TCopyright © 2024. All rights reserved.