Class ImmutableQuantifiedBasePair

java.lang.Object
pl.poznan.put.structure.QuantifiedBasePair
pl.poznan.put.structure.ImmutableQuantifiedBasePair
All Implemented Interfaces:
Serializable, Comparable<ClassifiedBasePair>, ClassifiedBasePair

@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable public final class ImmutableQuantifiedBasePair extends QuantifiedBasePair
Immutable implementation of QuantifiedBasePair.

Use the builder to create immutable instances: ImmutableQuantifiedBasePair.builder(). Use the static factory method to create immutable instances: ImmutableQuantifiedBasePair.of().

See Also:
  • Method Details

    • basePair

      public BasePair basePair()
      Specified by:
      basePair in interface ClassifiedBasePair
      Specified by:
      basePair in class QuantifiedBasePair
      Returns:
      The value of the basePair attribute
    • interactionType

      public InteractionType interactionType()
      Specified by:
      interactionType in interface ClassifiedBasePair
      Overrides:
      interactionType in class QuantifiedBasePair
      Returns:
      The value of the interactionType attribute
    • saenger

      public Saenger saenger()
      Specified by:
      saenger in interface ClassifiedBasePair
      Overrides:
      saenger in class QuantifiedBasePair
      Returns:
      The value of the saenger attribute
    • leontisWesthof

      public LeontisWesthof leontisWesthof()
      Specified by:
      leontisWesthof in interface ClassifiedBasePair
      Overrides:
      leontisWesthof in class QuantifiedBasePair
      Returns:
      The value of the leontisWesthof attribute
    • bph

      public BPh bph()
      Specified by:
      bph in interface ClassifiedBasePair
      Overrides:
      bph in class QuantifiedBasePair
      Returns:
      The value of the bph attribute
    • br

      public BR br()
      Specified by:
      br in interface ClassifiedBasePair
      Overrides:
      br in class QuantifiedBasePair
      Returns:
      The value of the br attribute
    • stackingTopology

      public StackingTopology stackingTopology()
      Specified by:
      stackingTopology in interface ClassifiedBasePair
      Overrides:
      stackingTopology in class QuantifiedBasePair
      Returns:
      The value of the stackingTopology attribute
    • isRepresented

      public boolean isRepresented()
      Specified by:
      isRepresented in interface ClassifiedBasePair
      Overrides:
      isRepresented in class QuantifiedBasePair
      Returns:
      The value of the isRepresented attribute
    • shear

      public double shear()
      Specified by:
      shear in class QuantifiedBasePair
      Returns:
      The value of shear parameter.
    • stretch

      public double stretch()
      Specified by:
      stretch in class QuantifiedBasePair
      Returns:
      The value of stretch parameter.
    • stagger

      public double stagger()
      Specified by:
      stagger in class QuantifiedBasePair
      Returns:
      The value of stagger parameter.
    • buckle

      public double buckle()
      Specified by:
      buckle in class QuantifiedBasePair
      Returns:
      The value of buckle parameter.
    • propeller

      public double propeller()
      Specified by:
      propeller in class QuantifiedBasePair
      Returns:
      The value of propeller parameter.
    • opening

      public double opening()
      Specified by:
      opening in class QuantifiedBasePair
      Returns:
      The value of opening parameter.
    • withBasePair

      public final ImmutableQuantifiedBasePair withBasePair(BasePair value)
      Copy the current immutable object by setting a value for the basePair attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for basePair
      Returns:
      A modified copy of the this object
    • withInteractionType

      public final ImmutableQuantifiedBasePair withInteractionType(InteractionType value)
      Copy the current immutable object by setting a value for the interactionType attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for interactionType
      Returns:
      A modified copy of the this object
    • withSaenger

      public final ImmutableQuantifiedBasePair withSaenger(Saenger value)
      Copy the current immutable object by setting a value for the saenger attribute. A value equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for saenger
      Returns:
      A modified copy of the this object
    • withLeontisWesthof

      public final ImmutableQuantifiedBasePair withLeontisWesthof(LeontisWesthof value)
      Copy the current immutable object by setting a value for the leontisWesthof attribute. A value equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for leontisWesthof
      Returns:
      A modified copy of the this object
    • withBph

      public final ImmutableQuantifiedBasePair withBph(BPh value)
      Copy the current immutable object by setting a value for the bph attribute. A value equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for bph
      Returns:
      A modified copy of the this object
    • withBr

      public final ImmutableQuantifiedBasePair withBr(BR value)
      Copy the current immutable object by setting a value for the br attribute. A value equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for br
      Returns:
      A modified copy of the this object
    • withStackingTopology

      public final ImmutableQuantifiedBasePair withStackingTopology(StackingTopology value)
      Copy the current immutable object by setting a value for the stackingTopology attribute. A value equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for stackingTopology
      Returns:
      A modified copy of the this object
    • withIsRepresented

      public final ImmutableQuantifiedBasePair withIsRepresented(boolean value)
      Copy the current immutable object by setting a value for the isRepresented attribute. A value equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for isRepresented
      Returns:
      A modified copy of the this object
    • withShear

      public final ImmutableQuantifiedBasePair withShear(double value)
      Copy the current immutable object by setting a value for the shear attribute. A value strict bits equality used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for shear
      Returns:
      A modified copy of the this object
    • withStretch

      public final ImmutableQuantifiedBasePair withStretch(double value)
      Copy the current immutable object by setting a value for the stretch attribute. A value strict bits equality used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for stretch
      Returns:
      A modified copy of the this object
    • withStagger

      public final ImmutableQuantifiedBasePair withStagger(double value)
      Copy the current immutable object by setting a value for the stagger attribute. A value strict bits equality used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for stagger
      Returns:
      A modified copy of the this object
    • withBuckle

      public final ImmutableQuantifiedBasePair withBuckle(double value)
      Copy the current immutable object by setting a value for the buckle attribute. A value strict bits equality used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for buckle
      Returns:
      A modified copy of the this object
    • withPropeller

      public final ImmutableQuantifiedBasePair withPropeller(double value)
      Copy the current immutable object by setting a value for the propeller attribute. A value strict bits equality used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for propeller
      Returns:
      A modified copy of the this object
    • withOpening

      public final ImmutableQuantifiedBasePair withOpening(double value)
      Copy the current immutable object by setting a value for the opening attribute. A value strict bits equality used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for opening
      Returns:
      A modified copy of the this object
    • equals

      public boolean equals(@Nullable Object another)
      This instance is equal to all instances of ImmutableQuantifiedBasePair that have equal attribute values.
      Overrides:
      equals in class Object
      Returns:
      true if this is equal to another instance
    • hashCode

      public int hashCode()
      Computes a hash code from attributes: basePair, interactionType, saenger, leontisWesthof, bph, br, stackingTopology.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

      public String toString()
      Prints the immutable value QuantifiedBasePair with attribute values.
      Overrides:
      toString in class Object
      Returns:
      A string representation of the value
    • of

      public static ImmutableQuantifiedBasePair of(BasePair basePair, double shear, double stretch, double stagger, double buckle, double propeller, double opening)
      Construct a new immutable QuantifiedBasePair instance.
      Parameters:
      basePair - The value for the basePair attribute
      shear - The value for the shear attribute
      stretch - The value for the stretch attribute
      stagger - The value for the stagger attribute
      buckle - The value for the buckle attribute
      propeller - The value for the propeller attribute
      opening - The value for the opening attribute
      Returns:
      An immutable QuantifiedBasePair instance
    • copyOf

      public static ImmutableQuantifiedBasePair copyOf(QuantifiedBasePair instance)
      Creates an immutable copy of a QuantifiedBasePair value. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.
      Parameters:
      instance - The instance to copy
      Returns:
      A copied immutable QuantifiedBasePair instance
    • builder

      public static ImmutableQuantifiedBasePair.Builder builder()
      Creates a builder for ImmutableQuantifiedBasePair.
       ImmutableQuantifiedBasePair.builder()
          .basePair(pl.poznan.put.structure.BasePair) // required basePair
          .interactionType(pl.poznan.put.rna.InteractionType) // optional interactionType
          .saenger(pl.poznan.put.notation.Saenger) // optional saenger
          .leontisWesthof(pl.poznan.put.notation.LeontisWesthof) // optional leontisWesthof
          .bph(pl.poznan.put.notation.BPh) // optional bph
          .br(pl.poznan.put.notation.BR) // optional br
          .stackingTopology(pl.poznan.put.notation.StackingTopology) // optional stackingTopology
          .isRepresented(boolean) // optional isRepresented
          .shear(double) // required shear
          .stretch(double) // required stretch
          .stagger(double) // required stagger
          .buckle(double) // required buckle
          .propeller(double) // required propeller
          .opening(double) // required opening
          .build();
       
      Returns:
      A new ImmutableQuantifiedBasePair builder