Class ImmutableExploreResult
java.lang.Object
fr.enedis.chutney.agent.domain.explore.ImmutableExploreResult
- All Implemented Interfaces:
ExploreResult
@Generated(from="ExploreResult",
generator="Immutables")
@ParametersAreNonnullByDefault
@Generated("org.immutables.processor.ProxyProcessor")
@Immutable
@CheckReturnValue
public final class ImmutableExploreResult
extends Object
implements ExploreResult
Immutable implementation of
ExploreResult.
Use the builder to create immutable instances:
ImmutableExploreResult.builder().
Use the static factory method to create immutable instances:
ImmutableExploreResult.of().
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeImmutableExploreResult.static final classImmutable implementation ofExploreResult.Link.static final classImmutable implementation ofExploreResult.Links. -
Field Summary
Fields inherited from interface fr.enedis.chutney.agent.domain.explore.ExploreResult
EMPTY -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Creates a builder forImmutableExploreResult.static ImmutableExploreResultcopyOf(ExploreResult instance) Creates an immutable copy of aExploreResultvalue.booleanThis instance is equal to all instances ofImmutableExploreResultthat have equal attribute values.inthashCode()Computes a hash code from attributes:agentLinks,targetLinks.static ImmutableExploreResultof(ExploreResult.Links<AgentId, AgentId> agentLinks, ExploreResult.Links<AgentId, TargetId> targetLinks) Construct a new immutableExploreResultinstance.toString()Prints the immutable valueExploreResultwith attribute values.final ImmutableExploreResultCopy the current immutable object by setting a value for theagentLinksattribute.final ImmutableExploreResultCopy the current immutable object by setting a value for thetargetLinksattribute.
-
Method Details
-
agentLinks
- Specified by:
agentLinksin interfaceExploreResult- Returns:
- The value of the
agentLinksattribute
-
targetLinks
- Specified by:
targetLinksin interfaceExploreResult- Returns:
- The value of the
targetLinksattribute
-
withAgentLinks
Copy the current immutable object by setting a value for theagentLinksattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for agentLinks- Returns:
- A modified copy or the
thisobject
-
withTargetLinks
Copy the current immutable object by setting a value for thetargetLinksattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for targetLinks- Returns:
- A modified copy or the
thisobject
-
equals
This instance is equal to all instances ofImmutableExploreResultthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:agentLinks,targetLinks. -
toString
Prints the immutable valueExploreResultwith attribute values. -
of
public static ImmutableExploreResult of(ExploreResult.Links<AgentId, AgentId> agentLinks, ExploreResult.Links<AgentId, TargetId> targetLinks) Construct a new immutableExploreResultinstance.- Parameters:
agentLinks- The value for theagentLinksattributetargetLinks- The value for thetargetLinksattribute- Returns:
- An immutable ExploreResult instance
-
copyOf
Creates an immutable copy of aExploreResultvalue. 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 ExploreResult instance
-
builder
Creates a builder forImmutableExploreResult.ImmutableExploreResult.builder() .agentLinks(fr.enedis.chutney.agent.domain.explore.ExploreResult.Links<fr.enedis.chutney.agent.domain.explore.AgentId, fr.enedis.chutney.agent.domain.explore.AgentId>) // requiredagentLinks.targetLinks(fr.enedis.chutney.agent.domain.explore.ExploreResult.Links<fr.enedis.chutney.agent.domain.explore.AgentId, fr.enedis.chutney.agent.domain.TargetId>) // requiredtargetLinks.build();- Returns:
- A new ImmutableExploreResult builder
-