Class ImmutableQueryId
java.lang.Object
org.kiwiproject.consul.model.query.QueryId
org.kiwiproject.consul.model.query.ImmutableQueryId
@ParametersAreNonnullByDefault
@Generated("org.immutables.processor.ProxyProcessor")
@Immutable
@CheckReturnValue
public final class ImmutableQueryId
extends QueryId
Immutable implementation of
QueryId
.
Use the builder to create immutable instances:
ImmutableQueryId.builder()
.
-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic ImmutableQueryId.Builder
builder()
Creates a builder forImmutableQueryId
.static ImmutableQueryId
Creates an immutable copy of aQueryId
value.boolean
This instance is equal to all instances ofImmutableQueryId
that have equal attribute values.getId()
int
hashCode()
Computes a hash code from attributes:id
.toString()
Prints the immutable valueQueryId
with attribute values.final ImmutableQueryId
Copy the current immutable object by setting a value for theid
attribute.
-
Method Details
-
getId
-
withId
Copy the current immutable object by setting a value for theid
attribute. 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
this
object
-
equals
This instance is equal to all instances ofImmutableQueryId
that have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:id
. -
toString
Prints the immutable valueQueryId
with attribute values. -
copyOf
Creates an immutable copy of aQueryId
value. 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) // required
id
.build();- Returns:
- A new ImmutableQueryId builder
-