@ParametersAreNonnullByDefault @Generated(value="org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableCustomTypeMeta extends Object implements CustomTypeMeta
CustomTypeMeta.
Use the builder to create immutable instances:
ImmutableCustomTypeMeta.builder().
| Modifier and Type | Class and Description |
|---|---|
static class |
ImmutableCustomTypeMeta.Builder
Builds instances of type
ImmutableCustomTypeMeta. |
| Modifier and Type | Method and Description |
|---|---|
static ImmutableCustomTypeMeta.Builder |
builder()
Creates a builder for
ImmutableCustomTypeMeta. |
static ImmutableCustomTypeMeta |
copyOf(CustomTypeMeta instance)
Creates an immutable copy of a
CustomTypeMeta value. |
boolean |
equals(Object another)
This instance is equal to all instances of
ImmutableCustomTypeMeta that have equal attribute values. |
Optional<String> |
getComment() |
Optional<Class<? extends Enum>> |
getEnumEquivalence() |
String |
getName() |
com.google.common.collect.ImmutableList<String> |
getValues() |
int |
hashCode()
Computes a hash code from attributes:
name, comment, enumEquivalence, values. |
String |
toString()
Prints the immutable value
CustomTypeMeta with attribute values. |
ImmutableCustomTypeMeta |
withComment(Optional<String> optional)
Copy the current immutable object by setting an optional value for the
comment attribute. |
ImmutableCustomTypeMeta |
withComment(String value)
Copy the current immutable object by setting a present value for the optional
comment attribute. |
ImmutableCustomTypeMeta |
withEnumEquivalence(Class<? extends Enum> value)
Copy the current immutable object by setting a present value for the optional
enumEquivalence attribute. |
ImmutableCustomTypeMeta |
withEnumEquivalence(Optional<? extends Class<? extends Enum>> optional)
Copy the current immutable object by setting an optional value for the
enumEquivalence attribute. |
ImmutableCustomTypeMeta |
withName(String value)
Copy the current immutable object by setting a value for the
name attribute. |
ImmutableCustomTypeMeta |
withValues(Iterable<String> elements)
Copy the current immutable object with elements that replace the content of
values. |
ImmutableCustomTypeMeta |
withValues(String... elements)
Copy the current immutable object with elements that replace the content of
values. |
public String getName()
getName in interface CustomTypeMetaname attributepublic Optional<String> getComment()
getComment in interface CustomTypeMetacomment attributepublic Optional<Class<? extends Enum>> getEnumEquivalence()
getEnumEquivalence in interface CustomTypeMetaenumEquivalence attributepublic com.google.common.collect.ImmutableList<String> getValues()
getValues in interface CustomTypeMetavalues attributepublic final ImmutableCustomTypeMeta withName(String value)
name attribute.
An equals check used to prevent copying of the same value by returning this.value - A new value for namethis objectpublic final ImmutableCustomTypeMeta withComment(String value)
comment attribute.value - The value for commentthis objectpublic final ImmutableCustomTypeMeta withComment(Optional<String> optional)
comment attribute.
An equality check is used on inner nullable value to prevent copying of the same value by returning this.optional - A value for commentthis objectpublic final ImmutableCustomTypeMeta withEnumEquivalence(Class<? extends Enum> value)
enumEquivalence attribute.value - The value for enumEquivalencethis objectpublic final ImmutableCustomTypeMeta withEnumEquivalence(Optional<? extends Class<? extends Enum>> optional)
enumEquivalence attribute.
A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returning this.optional - A value for enumEquivalencethis objectpublic final ImmutableCustomTypeMeta withValues(String... elements)
values.elements - The elements to setthis objectpublic final ImmutableCustomTypeMeta withValues(Iterable<String> elements)
values.
A shallow reference equality check is used to prevent copying of the same value by returning this.elements - An iterable of values elements to setthis objectpublic boolean equals(@Nullable Object another)
ImmutableCustomTypeMeta that have equal attribute values.public int hashCode()
name, comment, enumEquivalence, values.public String toString()
CustomTypeMeta with attribute values.public static ImmutableCustomTypeMeta copyOf(CustomTypeMeta instance)
CustomTypeMeta value.
Uses accessors to get values to initialize the new immutable instance.
If an instance is already immutable, it is returned as is.instance - The instance to copypublic static ImmutableCustomTypeMeta.Builder builder()
ImmutableCustomTypeMeta.
ImmutableCustomTypeMeta.builder()
.name(String) // required name
.comment(String) // optional comment
.enumEquivalence(Class<? extends Enum>) // optional enumEquivalence
.addValues|addAllValues(String) // values elements
.build();
Copyright © 2019 Nuiton. All rights reserved.