Package org.kiwiproject.consul.option
Class ImmutableQueryParameterOptions
java.lang.Object
org.kiwiproject.consul.option.QueryParameterOptions
org.kiwiproject.consul.option.ImmutableQueryParameterOptions
- All Implemented Interfaces:
ParamAdder
@Generated("org.immutables.processor.ProxyProcessor")
public final class ImmutableQueryParameterOptions
extends QueryParameterOptions
Immutable implementation of
QueryParameterOptions.
Use the builder to create immutable instances:
ImmutableQueryParameterOptions.builder().
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeImmutableQueryParameterOptions. -
Field Summary
Fields inherited from class org.kiwiproject.consul.option.QueryParameterOptions
BLANK -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Creates a builder forImmutableQueryParameterOptions.copyOf(QueryParameterOptions instance) Creates an immutable copy of aQueryParameterOptionsvalue.booleanThis instance is equal to all instances ofImmutableQueryParameterOptionsthat have equal attribute values.getPrune()inthashCode()Computes a hash code from attributes:toQuery,toHeaders,replaceExistingChecks,prune.toQuery()toString()Prints the immutable valueQueryParameterOptionswith attribute values.withPrune(boolean value) Copy the current immutable object by setting a present value for the optionalpruneattribute.Copy the current immutable object by setting an optional value for thepruneattribute.withReplaceExistingChecks(boolean value) Copy the current immutable object by setting a present value for the optionalreplaceExistingChecksattribute.withReplaceExistingChecks(Optional<Boolean> optional) Copy the current immutable object by setting an optional value for thereplaceExistingChecksattribute.withToHeaders(Map<String, ? extends String> entries) Copy the current immutable object by replacing thetoHeadersmap with the specified map.withToQuery(Map<String, ? extends Object> entries) Copy the current immutable object by replacing thetoQuerymap with the specified map.Methods inherited from class org.kiwiproject.consul.option.QueryParameterOptions
toQueryParameters
-
Method Details
-
toQuery
- Returns:
- The value of the
toQueryattribute
-
toHeaders
- Returns:
- The value of the
toHeadersattribute
-
getReplaceExistingChecks
- Specified by:
getReplaceExistingChecksin classQueryParameterOptions- Returns:
- The value of the
replaceExistingChecksattribute
-
getPrune
- Specified by:
getPrunein classQueryParameterOptions- Returns:
- The value of the
pruneattribute
-
withToQuery
Copy the current immutable object by replacing thetoQuerymap with the specified map. Nulls are not permitted as keys or values. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
entries- The entries to be added to the toQuery map- Returns:
- A modified copy of
thisobject
-
withToHeaders
Copy the current immutable object by replacing thetoHeadersmap with the specified map. Nulls are not permitted as keys or values. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
entries- The entries to be added to the toHeaders map- Returns:
- A modified copy of
thisobject
-
withReplaceExistingChecks
Copy the current immutable object by setting a present value for the optionalreplaceExistingChecksattribute.- Parameters:
value- The value for replaceExistingChecks- Returns:
- A modified copy of
thisobject
-
withReplaceExistingChecks
Copy the current immutable object by setting an optional value for thereplaceExistingChecksattribute. An equality check is used on inner nullable value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for replaceExistingChecks- Returns:
- A modified copy of
thisobject
-
withPrune
Copy the current immutable object by setting a present value for the optionalpruneattribute.- Parameters:
value- The value for prune- Returns:
- A modified copy of
thisobject
-
withPrune
Copy the current immutable object by setting an optional value for thepruneattribute. An equality check is used on inner nullable value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for prune- Returns:
- A modified copy of
thisobject
-
equals
This instance is equal to all instances ofImmutableQueryParameterOptionsthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:toQuery,toHeaders,replaceExistingChecks,prune. -
toString
Prints the immutable valueQueryParameterOptionswith attribute values. -
copyOf
Creates an immutable copy of aQueryParameterOptionsvalue. 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 QueryParameterOptions instance
-
builder
Creates a builder forImmutableQueryParameterOptions.ImmutableQueryParameterOptions.builder() .putToQuery|putAllToQuery(String => Object) //toQuerymappings .putToHeaders|putAllToHeaders(String => String) //toHeadersmappings .replaceExistingChecks(Boolean) // optionalreplaceExistingChecks.prune(Boolean) // optionalprune.build();- Returns:
- A new ImmutableQueryParameterOptions builder
-