@ParametersAreNonnullByDefault @Generated(value="org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableColumn extends Object implements Column
Column.
Use the builder to create immutable instances:
ImmutableColumn.builder().
| Modifier and Type | Class and Description |
|---|---|
static class |
ImmutableColumn.Builder
Builds instances of type
ImmutableColumn. |
Column.Kind, Column.Order| Modifier and Type | Method and Description |
|---|---|
static ImmutableColumn.Builder |
builder()
Creates a builder for
ImmutableColumn. |
static ImmutableColumn |
copyOf(Column instance)
Creates an immutable copy of a
Column value. |
String |
cqlName() |
boolean |
equals(Object another)
This instance is equal to all instances of
ImmutableColumn that have equal attribute values. |
int |
hashCode()
Returns a precomputed-on-construction hash code from attributes:
name, type, kind, order. |
Column.Kind |
kind() |
String |
name() |
Column.Order |
order() |
String |
toString()
Prints the immutable value
Column with attribute values. |
String |
type()
TODO do we ever need a more structured representation?
|
ImmutableColumn |
withKind(Column.Kind value)
Copy the current immutable object by setting a value for the
kind attribute. |
ImmutableColumn |
withName(String value)
Copy the current immutable object by setting a value for the
name attribute. |
ImmutableColumn |
withOrder(Column.Order value)
Copy the current immutable object by setting a value for the
order attribute. |
ImmutableColumn |
withType(String value)
Copy the current immutable object by setting a value for the
type attribute. |
public String name()
@Nullable public Column.Kind kind()
@Nullable public Column.Order order()
public final ImmutableColumn 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 ImmutableColumn withType(@Nullable String value)
type attribute.
An equals check used to prevent copying of the same value by returning this.value - A new value for type (can be null)this objectpublic final ImmutableColumn withKind(@Nullable Column.Kind value)
kind attribute.
A value equality check is used to prevent copying of the same value by returning this.value - A new value for kind (can be null)this objectpublic final ImmutableColumn withOrder(@Nullable Column.Order value)
order attribute.
A value equality check is used to prevent copying of the same value by returning this.value - A new value for order (can be null)this objectpublic boolean equals(@Nullable Object another)
ImmutableColumn that have equal attribute values.public int hashCode()
name, type, kind, order.public String toString()
Column with attribute values.public String cqlName()
Returns a lazily initialized value of the cqlName attribute.
Initialized once and only once and stored for subsequent access with proper synchronization.
In case of any exception or error thrown by the lazy value initializer,
the result will not be memoised (i.e. remembered) and on next call computation
will be attempted again.
public static ImmutableColumn copyOf(Column instance)
Column 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 ImmutableColumn.Builder builder()
ImmutableColumn.
ImmutableColumn.builder()
.name(String) // required name
.type(String | null) // nullable type
.kind(io.stargate.sgv2.common.cql.builder.Column.Kind | null) // nullable kind
.order(io.stargate.sgv2.common.cql.builder.Column.Order | null) // nullable order
.build();
Copyright © 2022. All rights reserved.