Package pl.poznan.put.types
Class ImmutableQuadruple.Builder<T>
- java.lang.Object
-
- pl.poznan.put.types.ImmutableQuadruple.Builder<T>
-
- Enclosing class:
- ImmutableQuadruple<T>
@NotThreadSafe public static final class ImmutableQuadruple.Builder<T> extends Object
Builds instances of typeImmutableQuadruple. 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 ImmutableQuadruple.Builder<T>a(T a)Initializes the value for theaattribute.ImmutableQuadruple.Builder<T>b(T b)Initializes the value for thebattribute.ImmutableQuadruple<T>build()Builds a newImmutableQuadruple.ImmutableQuadruple.Builder<T>c(T c)Initializes the value for thecattribute.ImmutableQuadruple.Builder<T>d(T d)Initializes the value for thedattribute.ImmutableQuadruple.Builder<T>from(Quadruple<T> instance)Fill a builder with attribute values from the providedQuadrupleinstance.
-
-
-
Method Detail
-
from
public final ImmutableQuadruple.Builder<T> from(Quadruple<T> instance)
Fill a builder with attribute values from the providedQuadrupleinstance. 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
-
a
public final ImmutableQuadruple.Builder<T> a(T a)
Initializes the value for theaattribute.- Parameters:
a- The value for a- Returns:
thisbuilder for use in a chained invocation
-
b
public final ImmutableQuadruple.Builder<T> b(T b)
Initializes the value for thebattribute.- Parameters:
b- The value for b- Returns:
thisbuilder for use in a chained invocation
-
c
public final ImmutableQuadruple.Builder<T> c(T c)
Initializes the value for thecattribute.- Parameters:
c- The value for c- Returns:
thisbuilder for use in a chained invocation
-
d
public final ImmutableQuadruple.Builder<T> d(T d)
Initializes the value for thedattribute.- Parameters:
d- The value for d- Returns:
thisbuilder for use in a chained invocation
-
build
public ImmutableQuadruple<T> build()
Builds a newImmutableQuadruple.- Returns:
- An immutable instance of Quadruple
- Throws:
IllegalStateException- if any required attributes are missing
-
-