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 ofExploreResult.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 Modifier and Type Class Description static classImmutableExploreResult.Links.Builder<SOURCE,DESTINATION>Builds instances of typeLinks.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static <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.booleanequals(Object another)This 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.StringtoString()Prints the immutable valueLinkswith attribute values.ImmutableExploreResult.Links<SOURCE,DESTINATION>withLinks(ExploreResult.Link<SOURCE,DESTINATION>... elements)Copy the current immutable object with elements that replace the content oflinks.ImmutableExploreResult.Links<SOURCE,DESTINATION>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, wait
-
Methods inherited from interface com.chutneytesting.agent.domain.explore.ExploreResult.Links
iterator, stream
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
-
-
-
Method Detail
-
links
public com.google.common.collect.ImmutableSet<ExploreResult.Link<SOURCE,DESTINATION>> 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
public boolean equals(@Nullable Object another)This instance is equal to all instances ofLinksthat have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:links.
-
toString
public String 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
-
-