Package io.resys.thena.docdb.spi.sql
Class ImmutableSql
- java.lang.Object
-
- io.resys.thena.docdb.spi.sql.ImmutableSql
-
- All Implemented Interfaces:
SqlBuilder.Sql
@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableSql extends Object implements SqlBuilder.Sql
Immutable implementation ofSqlBuilder.Sql.Use the builder to create immutable instances:
ImmutableSql.builder().
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImmutableSql.BuilderBuilds instances of typeImmutableSql.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutableSql.Builderbuilder()Creates a builder forImmutableSql.static ImmutableSqlcopyOf(SqlBuilder.Sql instance)Creates an immutable copy of aSqlBuilder.Sqlvalue.booleanequals(Object another)This instance is equal to all instances ofImmutableSqlthat have equal attribute values.StringgetValue()inthashCode()Computes a hash code from attributes:value.StringtoString()Prints the immutable valueSqlwith attribute values.ImmutableSqlwithValue(String value)Copy the current immutable object by setting a value for thevalueattribute.
-
-
-
Method Detail
-
getValue
public String getValue()
- Specified by:
getValuein interfaceSqlBuilder.Sql- Returns:
- The value of the
valueattribute
-
withValue
public final ImmutableSql withValue(String value)
Copy the current immutable object by setting a value for thevalueattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for value- Returns:
- A modified copy of the
thisobject
-
equals
public boolean equals(@Nullable Object another)This instance is equal to all instances ofImmutableSqlthat have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:value.
-
toString
public String toString()
Prints the immutable valueSqlwith attribute values.
-
copyOf
public static ImmutableSql copyOf(SqlBuilder.Sql instance)
Creates an immutable copy of aSqlBuilder.Sqlvalue. 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 Sql instance
-
builder
public static ImmutableSql.Builder builder()
Creates a builder forImmutableSql.ImmutableSql.builder() .value(String) // requiredvalue.build();- Returns:
- A new ImmutableSql builder
-
-