Class ImmutableCustomTypeMeta
java.lang.Object
org.nuiton.db.meta.ImmutableCustomTypeMeta
- All Implemented Interfaces:
CustomTypeMeta
@Generated(from="CustomTypeMeta",
generator="Immutables")
@ParametersAreNonnullByDefault
@Generated("org.immutables.processor.ProxyProcessor")
@Immutable
@CheckReturnValue
public final class ImmutableCustomTypeMeta
extends Object
implements CustomTypeMeta
Immutable implementation of
CustomTypeMeta.
Use the builder to create immutable instances:
ImmutableCustomTypeMeta.builder().
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeImmutableCustomTypeMeta. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Creates a builder forImmutableCustomTypeMeta.static ImmutableCustomTypeMetacopyOf(CustomTypeMeta instance) Creates an immutable copy of aCustomTypeMetavalue.booleanThis instance is equal to all instances ofImmutableCustomTypeMetathat have equal attribute values.getName()com.google.common.collect.ImmutableList<String> inthashCode()Computes a hash code from attributes:name,comment,enumEquivalence,values.toString()Prints the immutable valueCustomTypeMetawith attribute values.final ImmutableCustomTypeMetawithComment(String value) Copy the current immutable object by setting a present value for the optionalcommentattribute.final ImmutableCustomTypeMetawithComment(Optional<String> optional) Copy the current immutable object by setting an optional value for thecommentattribute.final ImmutableCustomTypeMetawithEnumEquivalence(Class<? extends Enum> value) Copy the current immutable object by setting a present value for the optionalenumEquivalenceattribute.final ImmutableCustomTypeMetawithEnumEquivalence(Optional<? extends Class<? extends Enum>> optional) Copy the current immutable object by setting an optional value for theenumEquivalenceattribute.final ImmutableCustomTypeMetaCopy the current immutable object by setting a value for thenameattribute.final ImmutableCustomTypeMetawithValues(Iterable<String> elements) Copy the current immutable object with elements that replace the content ofvalues.final ImmutableCustomTypeMetawithValues(String... elements) Copy the current immutable object with elements that replace the content ofvalues.
-
Method Details
-
getName
- Specified by:
getNamein interfaceCustomTypeMeta- Returns:
- The value of the
nameattribute
-
getComment
- Specified by:
getCommentin interfaceCustomTypeMeta- Returns:
- The value of the
commentattribute
-
getEnumEquivalence
- Specified by:
getEnumEquivalencein interfaceCustomTypeMeta- Returns:
- The value of the
enumEquivalenceattribute
-
getValues
- Specified by:
getValuesin interfaceCustomTypeMeta- Returns:
- The value of the
valuesattribute
-
withName
Copy the current immutable object by setting a value for thenameattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for name- Returns:
- A modified copy or the
thisobject
-
withComment
Copy the current immutable object by setting a present value for the optionalcommentattribute.- Parameters:
value- The value for comment- Returns:
- A modified copy or
thisif not changed
-
withComment
Copy the current immutable object by setting an optional value for thecommentattribute. An equality check is used on inner value to prevent copying of the same value by returningthis.- Parameters:
optional- An optional value for comment- Returns:
- A modified copy or
thisif not changed
-
withEnumEquivalence
Copy the current immutable object by setting a present value for the optionalenumEquivalenceattribute.- Parameters:
value- The value for enumEquivalence- Returns:
- A modified copy or
thisif not changed
-
withEnumEquivalence
public final ImmutableCustomTypeMeta withEnumEquivalence(Optional<? extends Class<? extends Enum>> optional) Copy the current immutable object by setting an optional value for theenumEquivalenceattribute. A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returningthis.- Parameters:
optional- An optional value for enumEquivalence- Returns:
- A modified copy or
thisif not changed
-
withValues
Copy the current immutable object with elements that replace the content ofvalues.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withValues
Copy the current immutable object with elements that replace the content ofvalues. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of values elements to set- Returns:
- A modified copy or
thisif not changed
-
equals
-
hashCode
-
toString
-
copyOf
Creates an immutable copy of aCustomTypeMetavalue. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.- Parameters:
instance- The instance to copy- Returns:
- A copied immutable CustomTypeMeta instance
-
builder
Creates a builder forImmutableCustomTypeMeta.ImmutableCustomTypeMeta.builder() .name(String) // required
name.comment(Optional<String>) // optionalcomment.enumEquivalence(Optional<Class<? extends Enum>>) // optionalenumEquivalence.addValues|addAllValues(String) //valueselements .build();- Returns:
- A new ImmutableCustomTypeMeta builder
-