Class ImmutableExploreResult.Links<SOURCE,DESTINATION>
java.lang.Object
com.chutneytesting.agent.domain.explore.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().
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic <SOURCE,DESTINATION>
ImmutableExploreResult.Links.Builder<SOURCE,DESTINATION> builder()Creates a builder forLinks.static <SOURCE,DESTINATION>
ImmutableExploreResult.Links<SOURCE,DESTINATION> copyOf(ExploreResult.Links<SOURCE, DESTINATION> instance) Creates an immutable copy of aExploreResult.Linksvalue.booleanThis instance is equal to all instances ofLinksthat have equal attribute values.inthashCode()Computes a hash code from attributes:links.com.google.common.collect.ImmutableSet<ExploreResult.Link<SOURCE,DESTINATION>> links()static <SOURCE,DESTINATION>
ImmutableExploreResult.Links<SOURCE,DESTINATION> of(Iterable<? extends ExploreResult.Link<SOURCE, DESTINATION>> links) Construct a new immutableLinksinstance.static <SOURCE,DESTINATION>
ImmutableExploreResult.Links<SOURCE,DESTINATION> of(Set<ExploreResult.Link<SOURCE, DESTINATION>> links) Construct a new immutableLinksinstance.toString()Prints the immutable valueLinkswith attribute values.withLinks(ExploreResult.Link<SOURCE, DESTINATION>... elements) Copy the current immutable object with elements that replace the content oflinks.withLinks(Iterable<? extends ExploreResult.Link<SOURCE, DESTINATION>> elements) Copy the current immutable object with elements that replace the content oflinks.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.chutneytesting.agent.domain.explore.ExploreResult.Links
iterator, streamMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Method Details
-
links
- Specified by:
linksin interfaceExploreResult.Links<SOURCE,DESTINATION> - Returns:
- The value of the
linksattribute
-
withLinks
@SafeVarargs public final ImmutableExploreResult.Links<SOURCE,DESTINATION> withLinks(ExploreResult.Link<SOURCE, DESTINATION>... elements) Copy the current immutable object with elements that replace the content oflinks.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withLinks
public final ImmutableExploreResult.Links<SOURCE,DESTINATION> withLinks(Iterable<? extends ExploreResult.Link<SOURCE, DESTINATION>> elements) Copy the current immutable object with elements that replace the content oflinks. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of links elements to set- Returns:
- A modified copy of
thisobject
-
equals
This instance is equal to all instances ofLinksthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:links. -
toString
Prints the immutable valueLinkswith attribute values. -
of
public static <SOURCE,DESTINATION> ImmutableExploreResult.Links<SOURCE,DESTINATION> of(Set<ExploreResult.Link<SOURCE, DESTINATION>> links) Construct a new immutableLinksinstance.- Type Parameters:
SOURCE- generic parameter SOURCEDESTINATION- generic parameter DESTINATION- Parameters:
links- The value for thelinksattribute- 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 immutableLinksinstance.- Type Parameters:
SOURCE- generic parameter SOURCEDESTINATION- generic parameter DESTINATION- Parameters:
links- The value for thelinksattribute- 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 aExploreResult.Linksvalue. 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 SOURCEDESTINATION- 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 forLinks.ImmutableExploreResult.Links.<SOURCE, DESTINATION>builder() .addLinks|addAllLinks(com.chutneytesting.agent.domain.explore.ExploreResult.Link<SOURCE, DESTINATION>) //linkselements .build();- Type Parameters:
SOURCE- generic parameter SOURCEDESTINATION- generic parameter DESTINATION- Returns:
- A new Links builder
-