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().

  • Method Details

    • agentLinks

      public ExploreResult.Links<AgentId,AgentId> agentLinks()
      Specified by:
      agentLinks in interface ExploreResult
      Returns:
      The value of the agentLinks attribute
    • targetLinks

      public ExploreResult.Links<AgentId,TargetId> targetLinks()
      Specified by:
      targetLinks in interface ExploreResult
      Returns:
      The value of the targetLinks attribute
    • withAgentLinks

      public final ImmutableExploreResult withAgentLinks(ExploreResult.Links<AgentId,AgentId> value)
      Copy the current immutable object by setting a value for the agentLinks attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for agentLinks
      Returns:
      A modified copy or the this object
    • withTargetLinks

      public final ImmutableExploreResult withTargetLinks(ExploreResult.Links<AgentId,TargetId> value)
      Copy the current immutable object by setting a value for the targetLinks attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for targetLinks
      Returns:
      A modified copy or the this object
    • equals

      public boolean equals(@Nullable Object another)
      This instance is equal to all instances of ImmutableExploreResult that have equal attribute values.
      Overrides:
      equals in class Object
      Returns:
      true if this is equal to another instance
    • hashCode

      public int hashCode()
      Computes a hash code from attributes: agentLinks, targetLinks.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

      public String toString()
      Prints the immutable value ExploreResult with attribute values.
      Overrides:
      toString in class Object
      Returns:
      A string representation of the value
    • of

      Construct a new immutable ExploreResult instance.
      Parameters:
      agentLinks - The value for the agentLinks attribute
      targetLinks - The value for the targetLinks attribute
      Returns:
      An immutable ExploreResult instance
    • copyOf

      public static ImmutableExploreResult copyOf(ExploreResult instance)
      Creates an immutable copy of a ExploreResult 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 ExploreResult instance
    • builder

      public static ImmutableExploreResult.Builder builder()
      Creates a builder for ImmutableExploreResult.
       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>) // required agentLinks
          .targetLinks(fr.enedis.chutney.agent.domain.explore.ExploreResult.Links<fr.enedis.chutney.agent.domain.explore.AgentId, fr.enedis.chutney.agent.domain.TargetId>) // required targetLinks
          .build();
       
      Returns:
      A new ImmutableExploreResult builder