Class ImmutableAgent
java.lang.Object
org.kiwiproject.consul.model.agent.Agent
org.kiwiproject.consul.model.agent.ImmutableAgent
@Generated("org.immutables.processor.ProxyProcessor")
public final class ImmutableAgent
extends Agent
Immutable implementation of
Agent.
Use the builder to create immutable instances:
ImmutableAgent.builder().
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic ImmutableAgent.Builderbuilder()Creates a builder forImmutableAgent.static ImmutableAgentCreates an immutable copy of aAgentvalue.booleanThis instance is equal to all instances ofImmutableAgentthat have equal attribute values.@Nullable DebugConfiggetMeta()inthashCode()Computes a hash code from attributes:config,debugConfig,member,meta.toString()Prints the immutable valueAgentwith attribute values.final ImmutableAgentwithConfig(Config value) Copy the current immutable object by setting a value for theconfigattribute.final ImmutableAgentwithDebugConfig(@Nullable DebugConfig value) Copy the current immutable object by setting a value for thedebugConfigattribute.final ImmutableAgentwithMember(Member value) Copy the current immutable object by setting a value for thememberattribute.final ImmutableAgentCopy the current immutable object by replacing themetamap with the specified map.
-
Method Details
-
getConfig
-
getDebugConfig
- Specified by:
getDebugConfigin classAgent- Returns:
- The value of the
debugConfigattribute
-
getMember
-
getMeta
-
withConfig
Copy the current immutable object by setting a value for theconfigattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for config- Returns:
- A modified copy of the
thisobject
-
withDebugConfig
Copy the current immutable object by setting a value for thedebugConfigattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for debugConfig (can benull)- Returns:
- A modified copy of the
thisobject
-
withMember
Copy the current immutable object by setting a value for thememberattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for member- Returns:
- A modified copy of the
thisobject
-
withMeta
Copy the current immutable object by replacing themetamap 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 meta map- Returns:
- A modified copy of
thisobject
-
equals
This instance is equal to all instances ofImmutableAgentthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:config,debugConfig,member,meta. -
toString
Prints the immutable valueAgentwith attribute values. -
copyOf
Creates an immutable copy of aAgentvalue. 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 Agent instance
-
builder
Creates a builder forImmutableAgent.ImmutableAgent.builder() .config(org.kiwiproject.consul.model.agent.Config) // requiredconfig.debugConfig(org.kiwiproject.consul.model.agent.@org.checkerframework.checker.nullness.qual.Nullable DebugConfig | null) // nullabledebugConfig.member(org.kiwiproject.consul.model.agent.Member) // requiredmember.putMeta|putAllMeta(String => String) //metamappings .build();- Returns:
- A new ImmutableAgent builder
-