Package pl.poznan.put.rna
Class ImmutableInteractionType.Builder
- java.lang.Object
-
- pl.poznan.put.rna.ImmutableInteractionType.Builder
-
- Enclosing class:
- ImmutableInteractionType
@NotThreadSafe public static final class ImmutableInteractionType.Builder extends Object
Builds instances of typeImmutableInteractionType. 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 ImmutableInteractionTypebuild()Builds a newImmutableInteractionType.ImmutableInteractionType.Builderdescription(String description)Initializes the value for thedescriptionattribute.ImmutableInteractionType.Builderfrom(InteractionType instance)Fill a builder with attribute values from the providedInteractionTypeinstance.ImmutableInteractionType.BuilderisPairing(boolean isPairing)Initializes the value for theisPairingattribute.ImmutableInteractionType.Builderleft(NucleotideComponentType left)Initializes the value for theleftattribute.ImmutableInteractionType.Builderright(NucleotideComponentType right)Initializes the value for therightattribute.
-
-
-
Method Detail
-
from
public final ImmutableInteractionType.Builder from(InteractionType instance)
Fill a builder with attribute values from the providedInteractionTypeinstance. 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
-
left
public final ImmutableInteractionType.Builder left(NucleotideComponentType left)
Initializes the value for theleftattribute.- Parameters:
left- The value for left- Returns:
thisbuilder for use in a chained invocation
-
right
public final ImmutableInteractionType.Builder right(NucleotideComponentType right)
Initializes the value for therightattribute.- Parameters:
right- The value for right- Returns:
thisbuilder for use in a chained invocation
-
isPairing
public final ImmutableInteractionType.Builder isPairing(boolean isPairing)
Initializes the value for theisPairingattribute.- Parameters:
isPairing- The value for isPairing- Returns:
thisbuilder for use in a chained invocation
-
description
public final ImmutableInteractionType.Builder description(String description)
Initializes the value for thedescriptionattribute.If not set, this attribute will have a default value as returned by the initializer of
description.- Parameters:
description- The value for description- Returns:
thisbuilder for use in a chained invocation
-
build
public ImmutableInteractionType build()
Builds a newImmutableInteractionType.- Returns:
- An immutable instance of InteractionType
- Throws:
IllegalStateException- if any required attributes are missing
-
-