Class ImmutableQuantifiedBasePair

    • Method Detail

      • 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
      • 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.
        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
            .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