@ParametersAreNonnullByDefault @Generated(value="org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableQueryResults extends QueryResults
QueryResults.
Use the builder to create immutable instances:
ImmutableQueryResults.builder().
| Modifier and Type | Class and Description |
|---|---|
static class |
ImmutableQueryResults.Builder
Builds instances of type
ImmutableQueryResults. |
| Modifier and Type | Method and Description |
|---|---|
static ImmutableQueryResults.Builder |
builder()
Creates a builder for
ImmutableQueryResults. |
static ImmutableQueryResults |
copyOf(QueryResults instance)
Creates an immutable copy of a
QueryResults value. |
boolean |
equals(Object another)
This instance is equal to all instances of
ImmutableQueryResults that have equal attribute values. |
int |
hashCode()
Computes a hash code from attributes:
service, nodes. |
com.google.common.collect.ImmutableList<ServiceHealth> |
nodes() |
String |
service() |
String |
toString()
Prints the immutable value
QueryResults with attribute values. |
ImmutableQueryResults |
withNodes(Iterable<? extends ServiceHealth> elements)
Copy the current immutable object with elements that replace the content of
nodes. |
ImmutableQueryResults |
withNodes(ServiceHealth... elements)
Copy the current immutable object with elements that replace the content of
nodes. |
ImmutableQueryResults |
withService(String value)
Copy the current immutable object by setting a value for the
service attribute. |
public String service()
service in class QueryResultsservice attributepublic com.google.common.collect.ImmutableList<ServiceHealth> nodes()
nodes in class QueryResultsnodes attributepublic final ImmutableQueryResults withService(String value)
service attribute.
An equals check used to prevent copying of the same value by returning this.value - A new value for servicethis objectpublic final ImmutableQueryResults withNodes(ServiceHealth... elements)
nodes.elements - The elements to setthis objectpublic final ImmutableQueryResults withNodes(Iterable<? extends ServiceHealth> elements)
nodes.
A shallow reference equality check is used to prevent copying of the same value by returning this.elements - An iterable of nodes elements to setthis objectpublic boolean equals(@Nullable Object another)
ImmutableQueryResults that have equal attribute values.public int hashCode()
service, nodes.public String toString()
QueryResults with attribute values.public static ImmutableQueryResults copyOf(QueryResults instance)
QueryResults 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 ImmutableQueryResults.Builder builder()
ImmutableQueryResults.
ImmutableQueryResults.builder()
.service(String) // required service
.addNodes|addAllNodes(com.orbitz.consul.model.health.ServiceHealth) // nodes elements
.build();
Copyright © 2019. All rights reserved.