Class ImmutableExploreResult.Links<SOURCE,​DESTINATION>

  • All Implemented Interfaces:
    ExploreResult.Links<SOURCE,​DESTINATION>, Iterable<ExploreResult.Link<SOURCE,​DESTINATION>>
    Enclosing class:
    ImmutableExploreResult

    @Immutable
    @CheckReturnValue
    public static final class ImmutableExploreResult.Links<SOURCE,​DESTINATION>
    extends Object
    implements ExploreResult.Links<SOURCE,​DESTINATION>
    Immutable implementation of ExploreResult.Links.

    Use the builder to create immutable instances: ImmutableExploreResult.Links.builder(). Use the static factory method to create immutable instances: ImmutableExploreResult.Links.of().

    • Method Detail

      • equals

        public boolean equals​(@Nullable
                              Object another)
        This instance is equal to all instances of Links 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: links.
        Overrides:
        hashCode in class Object
        Returns:
        hashCode value
      • toString

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

        public static <SOURCE,​DESTINATION> ImmutableExploreResult.Links<SOURCE,​DESTINATION> of​(Set<ExploreResult.Link<SOURCE,​DESTINATION>> links)
        Construct a new immutable Links instance.
        Type Parameters:
        SOURCE - generic parameter SOURCE
        DESTINATION - generic parameter DESTINATION
        Parameters:
        links - The value for the links attribute
        Returns:
        An immutable Links instance
      • of

        public static <SOURCE,​DESTINATION> ImmutableExploreResult.Links<SOURCE,​DESTINATION> of​(Iterable<? extends ExploreResult.Link<SOURCE,​DESTINATION>> links)
        Construct a new immutable Links instance.
        Type Parameters:
        SOURCE - generic parameter SOURCE
        DESTINATION - generic parameter DESTINATION
        Parameters:
        links - The value for the links attribute
        Returns:
        An immutable Links instance
      • copyOf

        public static <SOURCE,​DESTINATION> ImmutableExploreResult.Links<SOURCE,​DESTINATION> copyOf​(ExploreResult.Links<SOURCE,​DESTINATION> instance)
        Creates an immutable copy of a ExploreResult.Links value. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.
        Type Parameters:
        SOURCE - generic parameter SOURCE
        DESTINATION - generic parameter DESTINATION
        Parameters:
        instance - The instance to copy
        Returns:
        A copied immutable Links instance
      • builder

        public static <SOURCE,​DESTINATION> ImmutableExploreResult.Links.Builder<SOURCE,​DESTINATION> builder()
        Creates a builder for Links.
         ImmutableExploreResult.Links.&lt;SOURCE, DESTINATION&gt;builder()
            .addLinks|addAllLinks(com.chutneytesting.agent.domain.explore.ExploreResult.Link&lt;SOURCE, DESTINATION&gt;) // links elements
            .build();
         
        Type Parameters:
        SOURCE - generic parameter SOURCE
        DESTINATION - generic parameter DESTINATION
        Returns:
        A new Links builder