Package org.projectnessie.model
Class ImmutableTableReference
- java.lang.Object
-
- org.projectnessie.model.TableReference
-
- org.projectnessie.model.ImmutableTableReference
-
@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableTableReference extends TableReference
Immutable implementation ofTableReference.Use the builder to create immutable instances:
ImmutableTableReference.builder().
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImmutableTableReference.BuilderBuilds instances of typeImmutableTableReference.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutableTableReference.Builderbuilder()Creates a builder forImmutableTableReference.static ImmutableTableReferencecopyOf(TableReference instance)Creates an immutable copy of aTableReferencevalue.booleanequals(Object another)This instance is equal to all instances ofImmutableTableReferencethat have equal attribute values.StringgetHash()StringgetName()StringgetReference()StringgetTimestamp()inthashCode()Computes a hash code from attributes:name,reference,timestamp,hash.ImmutableTableReferencewithHash(String value)Copy the current immutable object by setting a value for thehashattribute.ImmutableTableReferencewithName(String value)Copy the current immutable object by setting a value for thenameattribute.ImmutableTableReferencewithReference(String value)Copy the current immutable object by setting a value for thereferenceattribute.ImmutableTableReferencewithTimestamp(String value)Copy the current immutable object by setting a value for thetimestampattribute.-
Methods inherited from class org.projectnessie.model.TableReference
hasHash, hasReference, hasTimestamp, parse, toString
-
-
-
-
Method Detail
-
getName
public String getName()
- Specified by:
getNamein classTableReference- Returns:
- The value of the
nameattribute
-
getReference
@Nullable public String getReference()
- Specified by:
getReferencein classTableReference- Returns:
- The value of the
referenceattribute
-
getTimestamp
@Nullable public String getTimestamp()
- Specified by:
getTimestampin classTableReference- Returns:
- The value of the
timestampattribute
-
getHash
@Nullable public String getHash()
- Specified by:
getHashin classTableReference- Returns:
- The value of the
hashattribute
-
withName
public final ImmutableTableReference withName(String value)
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 of the
thisobject
-
withReference
public final ImmutableTableReference withReference(@Nullable String value)
Copy the current immutable object by setting a value for thereferenceattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for reference (can benull)- Returns:
- A modified copy of the
thisobject
-
withTimestamp
public final ImmutableTableReference withTimestamp(@Nullable String value)
Copy the current immutable object by setting a value for thetimestampattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for timestamp (can benull)- Returns:
- A modified copy of the
thisobject
-
withHash
public final ImmutableTableReference withHash(@Nullable String value)
Copy the current immutable object by setting a value for thehashattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for hash (can benull)- Returns:
- A modified copy of the
thisobject
-
equals
public boolean equals(@Nullable Object another)
This instance is equal to all instances ofImmutableTableReferencethat have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:name,reference,timestamp,hash.
-
copyOf
public static ImmutableTableReference copyOf(TableReference instance)
Creates an immutable copy of aTableReferencevalue. 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 TableReference instance
-
builder
public static ImmutableTableReference.Builder builder()
Creates a builder forImmutableTableReference.ImmutableTableReference.builder() .name(String) // requiredname.reference(String | null) // nullablereference.timestamp(String | null) // nullabletimestamp.hash(String | null) // nullablehash.build();- Returns:
- A new ImmutableTableReference builder
-
-