Class ImmutableAnalyzedBasePair

    • Method Detail

      • withBasePair

        public final ImmutableAnalyzedBasePair 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 ImmutableAnalyzedBasePair 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 ImmutableAnalyzedBasePair 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 ImmutableAnalyzedBasePair 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 ImmutableAnalyzedBasePair 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 ImmutableAnalyzedBasePair 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 ImmutableAnalyzedBasePair 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
      • equals

        public boolean equals​(@Nullable
                              Object another)
        This instance is equal to all instances of ImmutableAnalyzedBasePair 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 AnalyzedBasePair with attribute values.
        Overrides:
        toString in class Object
        Returns:
        A string representation of the value
      • of

        public static ImmutableAnalyzedBasePair of​(BasePair basePair)
        Construct a new immutable AnalyzedBasePair instance.
        Parameters:
        basePair - The value for the basePair attribute
        Returns:
        An immutable AnalyzedBasePair instance
      • copyOf

        public static ImmutableAnalyzedBasePair copyOf​(AnalyzedBasePair instance)
        Creates an immutable copy of a AnalyzedBasePair 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 AnalyzedBasePair instance
      • builder

        public static ImmutableAnalyzedBasePair.Builder builder()
        Creates a builder for ImmutableAnalyzedBasePair.
         ImmutableAnalyzedBasePair.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
            .build();
         
        Returns:
        A new ImmutableAnalyzedBasePair builder