Package pl.poznan.put.rna
Class ImmutableBasePairParameters.Builder
- java.lang.Object
-
- pl.poznan.put.rna.ImmutableBasePairParameters.Builder
-
- Enclosing class:
- ImmutableBasePairParameters
@NotThreadSafe public static final class ImmutableBasePairParameters.Builder extends Object
Builds instances of typeImmutableBasePairParameters. 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 ImmutableBasePairParameters.Builderbuckle(Angle buckle)Initializes the value for thebuckleattribute.ImmutableBasePairParametersbuild()Builds a newImmutableBasePairParameters.ImmutableBasePairParameters.Builderfrom(BasePairParameters instance)Fill a builder with attribute values from the providedBasePairParametersinstance.ImmutableBasePairParameters.BuilderinterBaseAngle(Angle interBaseAngle)Initializes the value for theinterBaseAngleattribute.ImmutableBasePairParameters.Builderopening(Angle opening)Initializes the value for theopeningattribute.ImmutableBasePairParameters.Builderpropeller(Angle propeller)Initializes the value for thepropellerattribute.ImmutableBasePairParameters.Buildershear(double shear)Initializes the value for theshearattribute.ImmutableBasePairParameters.Builderstagger(double stagger)Initializes the value for thestaggerattribute.ImmutableBasePairParameters.Builderstretch(double stretch)Initializes the value for thestretchattribute.
-
-
-
Method Detail
-
from
public final ImmutableBasePairParameters.Builder from(BasePairParameters instance)
Fill a builder with attribute values from the providedBasePairParametersinstance. 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
-
shear
public final ImmutableBasePairParameters.Builder shear(double shear)
Initializes the value for theshearattribute.- Parameters:
shear- The value for shear- Returns:
thisbuilder for use in a chained invocation
-
stretch
public final ImmutableBasePairParameters.Builder stretch(double stretch)
Initializes the value for thestretchattribute.- Parameters:
stretch- The value for stretch- Returns:
thisbuilder for use in a chained invocation
-
stagger
public final ImmutableBasePairParameters.Builder stagger(double stagger)
Initializes the value for thestaggerattribute.- Parameters:
stagger- The value for stagger- Returns:
thisbuilder for use in a chained invocation
-
buckle
public final ImmutableBasePairParameters.Builder buckle(Angle buckle)
Initializes the value for thebuckleattribute.- Parameters:
buckle- The value for buckle- Returns:
thisbuilder for use in a chained invocation
-
propeller
public final ImmutableBasePairParameters.Builder propeller(Angle propeller)
Initializes the value for thepropellerattribute.- Parameters:
propeller- The value for propeller- Returns:
thisbuilder for use in a chained invocation
-
opening
public final ImmutableBasePairParameters.Builder opening(Angle opening)
Initializes the value for theopeningattribute.- Parameters:
opening- The value for opening- Returns:
thisbuilder for use in a chained invocation
-
interBaseAngle
public final ImmutableBasePairParameters.Builder interBaseAngle(Angle interBaseAngle)
Initializes the value for theinterBaseAngleattribute.- Parameters:
interBaseAngle- The value for interBaseAngle- Returns:
thisbuilder for use in a chained invocation
-
build
public ImmutableBasePairParameters build()
Builds a newImmutableBasePairParameters.- Returns:
- An immutable instance of BasePairParameters
- Throws:
IllegalStateException- if any required attributes are missing
-
-