Package com.telenordigital.nbiot
Class ImmutableTeamList.Builder
- java.lang.Object
-
- com.telenordigital.nbiot.ImmutableTeamList.Builder
-
- Enclosing class:
- ImmutableTeamList
@NotThreadSafe public static final class ImmutableTeamList.Builder extends Object
Builds instances of typeImmutableTeamList. 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.
-
-
Constructor Summary
Constructors Constructor Description Builder()Creates a builder forImmutableTeamListinstances.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ImmutableTeamListbuild()Builds a newImmutableTeamList.ImmutableTeamList.Builderfrom(Team.TeamList instance)Fill a builder with attribute values from the providedTeamListinstance.ImmutableTeamList.Builderteams(Team... teams)Initializes the value for theteamsattribute.
-
-
-
Constructor Detail
-
Builder
public Builder()
Creates a builder forImmutableTeamListinstances.
-
-
Method Detail
-
from
public final ImmutableTeamList.Builder from(Team.TeamList instance)
Fill a builder with attribute values from the providedTeamListinstance. Regular attribute values will be replaced with those from the given instance. Absent optional values will not replace present values.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
teams
public final ImmutableTeamList.Builder teams(Team... teams)
Initializes the value for theteamsattribute.- Parameters:
teams- The elements for teams- Returns:
thisbuilder for use in a chained invocation
-
build
public ImmutableTeamList build()
Builds a newImmutableTeamList.- Returns:
- An immutable instance of TeamList
- Throws:
IllegalStateException- if any required attributes are missing
-
-