Class ImmutableExploreResult.Links.Builder<SOURCE,DESTINATION>
java.lang.Object
fr.enedis.chutney.agent.domain.explore.ImmutableExploreResult.Links.Builder<SOURCE,DESTINATION>
- Enclosing class:
ImmutableExploreResult.Links<SOURCE,DESTINATION>
@Generated(from="ExploreResult.Links",
generator="Immutables")
@NotThreadSafe
public static final class ImmutableExploreResult.Links.Builder<SOURCE,DESTINATION>
extends Object
-
Method Summary
Modifier and TypeMethodDescriptionaddAllLinks(Iterable<? extends ExploreResult.Link<SOURCE, DESTINATION>> elements) Adds elements tolinksset.addLinks(ExploreResult.Link<SOURCE, DESTINATION> element) Adds one element tolinksset.addLinks(ExploreResult.Link<SOURCE, DESTINATION>... elements) Adds elements tolinksset.build()Builds a newLinks.from(ExploreResult.Links<SOURCE, DESTINATION> instance) Fill a builder with attribute values from the providedLinksinstance.links(Iterable<? extends ExploreResult.Link<SOURCE, DESTINATION>> elements) Sets or replaces all elements forlinksset.
-
Method Details
-
from
@CanIgnoreReturnValue public final ImmutableExploreResult.Links.Builder<SOURCE,DESTINATION> from(ExploreResult.Links<SOURCE, DESTINATION> instance) Fill a builder with attribute values from the providedLinksinstance. Regular attribute values will be replaced with those from the given instance. Absent optional values will not replace present values. Collection elements and entries will be added, not replaced.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
addLinks
@CanIgnoreReturnValue public final ImmutableExploreResult.Links.Builder<SOURCE,DESTINATION> addLinks(ExploreResult.Link<SOURCE, DESTINATION> element) Adds one element tolinksset.- Parameters:
element- A links element- Returns:
thisbuilder for use in a chained invocation
-
addLinks
@CanIgnoreReturnValue @SafeVarargs public final ImmutableExploreResult.Links.Builder<SOURCE,DESTINATION> addLinks(ExploreResult.Link<SOURCE, DESTINATION>... elements) Adds elements tolinksset.- Parameters:
elements- An array of links elements- Returns:
thisbuilder for use in a chained invocation
-
links
@CanIgnoreReturnValue public final ImmutableExploreResult.Links.Builder<SOURCE,DESTINATION> links(Iterable<? extends ExploreResult.Link<SOURCE, DESTINATION>> elements) Sets or replaces all elements forlinksset.- Parameters:
elements- An iterable of links elements- Returns:
thisbuilder for use in a chained invocation
-
addAllLinks
@CanIgnoreReturnValue public final ImmutableExploreResult.Links.Builder<SOURCE,DESTINATION> addAllLinks(Iterable<? extends ExploreResult.Link<SOURCE, DESTINATION>> elements) Adds elements tolinksset.- Parameters:
elements- An iterable of links elements- Returns:
thisbuilder for use in a chained invocation
-
build
Builds a newLinks.- Returns:
- An immutable instance of Links
- Throws:
IllegalStateException- if any required attributes are missing
-