Package com.spotify.github.v3.checks
Class ImmutableInstallationList.Builder
- java.lang.Object
-
- com.spotify.github.v3.checks.ImmutableInstallationList.Builder
-
- Enclosing class:
- ImmutableInstallationList
@NotThreadSafe public static final class ImmutableInstallationList.Builder extends Object
Builds instances of typeImmutableInstallationList. Initialize attributes and then invoke thebuild()method to create an immutable instance.Builderis not thread-safe and generally should not be stored in a field or collection, but instead used immediately to create instances.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ImmutableInstallationList.BuilderaddAllInstallations(Iterable<? extends Installation> elements)Adds elements toinstallationslist.ImmutableInstallationList.BuilderaddInstallations(Installation element)Adds one element toinstallationslist.ImmutableInstallationList.BuilderaddInstallations(Installation... elements)Adds elements toinstallationslist.ImmutableInstallationListbuild()Builds a newImmutableInstallationList.ImmutableInstallationList.Builderfrom(InstallationList instance)Fill a builder with attribute values from the providedInstallationListinstance.ImmutableInstallationList.Builderinstallations(Iterable<? extends Installation> elements)Sets or replaces all elements forinstallationslist.ImmutableInstallationList.BuildertotalCount(int totalCount)Initializes the value for thetotalCountattribute.
-
-
-
Method Detail
-
from
@CanIgnoreReturnValue public final ImmutableInstallationList.Builder from(InstallationList instance)
Fill a builder with attribute values from the providedInstallationListinstance. 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
-
totalCount
@CanIgnoreReturnValue public final ImmutableInstallationList.Builder totalCount(int totalCount)
Initializes the value for thetotalCountattribute.- Parameters:
totalCount- The value for totalCount- Returns:
thisbuilder for use in a chained invocation
-
addInstallations
@CanIgnoreReturnValue public final ImmutableInstallationList.Builder addInstallations(Installation element)
Adds one element toinstallationslist.- Parameters:
element- A installations element- Returns:
thisbuilder for use in a chained invocation
-
addInstallations
@CanIgnoreReturnValue public final ImmutableInstallationList.Builder addInstallations(Installation... elements)
Adds elements toinstallationslist.- Parameters:
elements- An array of installations elements- Returns:
thisbuilder for use in a chained invocation
-
installations
@CanIgnoreReturnValue public final ImmutableInstallationList.Builder installations(Iterable<? extends Installation> elements)
Sets or replaces all elements forinstallationslist.- Parameters:
elements- An iterable of installations elements- Returns:
thisbuilder for use in a chained invocation
-
addAllInstallations
@CanIgnoreReturnValue public final ImmutableInstallationList.Builder addAllInstallations(Iterable<? extends Installation> elements)
Adds elements toinstallationslist.- Parameters:
elements- An iterable of installations elements- Returns:
thisbuilder for use in a chained invocation
-
build
public ImmutableInstallationList build()
Builds a newImmutableInstallationList.- Returns:
- An immutable instance of InstallationList
- Throws:
IllegalStateException- if any required attributes are missing
-
-