Class ImmutableQueryId
java.lang.Object
org.kiwiproject.consul.model.query.QueryId
org.kiwiproject.consul.model.query.ImmutableQueryId
@Generated("org.immutables.processor.ProxyProcessor")
public final class ImmutableQueryId
extends QueryId
Immutable implementation of
QueryId.
Use the builder to create immutable instances:
ImmutableQueryId.builder().
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic ImmutableQueryId.Builderbuilder()Creates a builder forImmutableQueryId.static ImmutableQueryIdCreates an immutable copy of aQueryIdvalue.booleanThis instance is equal to all instances ofImmutableQueryIdthat have equal attribute values.getId()inthashCode()Computes a hash code from attributes:id.toString()Prints the immutable valueQueryIdwith attribute values.final ImmutableQueryIdCopy the current immutable object by setting a value for theidattribute.
-
Method Details
-
getId
-
withId
Copy the current immutable object by setting a value for theidattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for id- Returns:
- A modified copy of the
thisobject
-
equals
This instance is equal to all instances ofImmutableQueryIdthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:id. -
toString
Prints the immutable valueQueryIdwith attribute values. -
copyOf
Creates an immutable copy of aQueryIdvalue. 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 QueryId instance
-
builder
Creates a builder forImmutableQueryId.ImmutableQueryId.builder() .id(String) // requiredid.build();- Returns:
- A new ImmutableQueryId builder
-