Package pl.poznan.put.rna
Class ImmutableStandardReferenceFrame.Builder
- java.lang.Object
-
- pl.poznan.put.rna.ImmutableStandardReferenceFrame.Builder
-
- Enclosing class:
- ImmutableStandardReferenceFrame
@NotThreadSafe public static final class ImmutableStandardReferenceFrame.Builder extends Object
Builds instances of typeImmutableStandardReferenceFrame. 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 ImmutableStandardReferenceFramebuild()Builds a newImmutableStandardReferenceFrame.ImmutableStandardReferenceFrame.Builderfrom(StandardReferenceFrame instance)Fill a builder with attribute values from the providedStandardReferenceFrameinstance.ImmutableStandardReferenceFrame.BuilderlongAxisAtom(Optional<PdbAtomLine> longAxisAtom)Initializes the value for thelongAxisAtomattribute.ImmutableStandardReferenceFrame.Builderorigin(org.apache.commons.math3.geometry.euclidean.threed.Vector3D origin)Initializes the value for theoriginattribute.ImmutableStandardReferenceFrame.Builderx(org.apache.commons.math3.geometry.euclidean.threed.Vector3D x)Initializes the value for thexattribute.ImmutableStandardReferenceFrame.Buildery(org.apache.commons.math3.geometry.euclidean.threed.Vector3D y)Initializes the value for theyattribute.ImmutableStandardReferenceFrame.Builderz(org.apache.commons.math3.geometry.euclidean.threed.Vector3D z)Initializes the value for thezattribute.
-
-
-
Method Detail
-
from
public final ImmutableStandardReferenceFrame.Builder from(StandardReferenceFrame instance)
Fill a builder with attribute values from the providedStandardReferenceFrameinstance. 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
-
origin
public final ImmutableStandardReferenceFrame.Builder origin(org.apache.commons.math3.geometry.euclidean.threed.Vector3D origin)
Initializes the value for theoriginattribute.- Parameters:
origin- The value for origin- Returns:
thisbuilder for use in a chained invocation
-
x
public final ImmutableStandardReferenceFrame.Builder x(org.apache.commons.math3.geometry.euclidean.threed.Vector3D x)
Initializes the value for thexattribute.- Parameters:
x- The value for x- Returns:
thisbuilder for use in a chained invocation
-
y
public final ImmutableStandardReferenceFrame.Builder y(org.apache.commons.math3.geometry.euclidean.threed.Vector3D y)
Initializes the value for theyattribute.- Parameters:
y- The value for y- Returns:
thisbuilder for use in a chained invocation
-
z
public final ImmutableStandardReferenceFrame.Builder z(org.apache.commons.math3.geometry.euclidean.threed.Vector3D z)
Initializes the value for thezattribute.- Parameters:
z- The value for z- Returns:
thisbuilder for use in a chained invocation
-
longAxisAtom
public final ImmutableStandardReferenceFrame.Builder longAxisAtom(Optional<PdbAtomLine> longAxisAtom)
Initializes the value for thelongAxisAtomattribute.If not set, this attribute will have a default value as returned by the initializer of
longAxisAtom.- Parameters:
longAxisAtom- The value for longAxisAtom- Returns:
thisbuilder for use in a chained invocation
-
build
public ImmutableStandardReferenceFrame build()
Builds a newImmutableStandardReferenceFrame.- Returns:
- An immutable instance of StandardReferenceFrame
- Throws:
IllegalStateException- if any required attributes are missing
-
-