Class ImmutableCombinedStrandFromPdb

    • Method Detail

      • combineStrands

        public List<DotBracket> combineStrands()
        Combines strands which share a base pair into a new dot-bracket instance and returns a list of those.
        Returns:
        The list of dot-bracket instances, each containing strands which only pair with each other.
      • withCombineStrands

        public final ImmutableCombinedStrandFromPdb withCombineStrands​(DotBracket... elements)
        Copy the current immutable object with elements that replace the content of combineStrands.
        Parameters:
        elements - The elements to set
        Returns:
        A modified copy of this object
      • withCombineStrands

        public final ImmutableCombinedStrandFromPdb withCombineStrands​(Iterable<? extends DotBracket> elements)
        Copy the current immutable object with elements that replace the content of combineStrands. A shallow reference equality check is used to prevent copying of the same value by returning this.
        Parameters:
        elements - An iterable of combineStrands elements to set
        Returns:
        A modified copy of this object
      • withInputStrands

        public final ImmutableCombinedStrandFromPdb withInputStrands​(Strand... elements)
        Copy the current immutable object with elements that replace the content of inputStrands.
        Parameters:
        elements - The elements to set
        Returns:
        A modified copy of this object
      • withInputStrands

        public final ImmutableCombinedStrandFromPdb withInputStrands​(Iterable<? extends Strand> elements)
        Copy the current immutable object with elements that replace the content of inputStrands. A shallow reference equality check is used to prevent copying of the same value by returning this.
        Parameters:
        elements - An iterable of inputStrands elements to set
        Returns:
        A modified copy of this object
      • withInputSymbolToResidue

        public final ImmutableCombinedStrandFromPdb withInputSymbolToResidue​(Map<? extends DotBracketSymbol,​? extends PdbResidueIdentifier> entries)
        Copy the current immutable object by replacing the inputSymbolToResidue map with the specified map. Nulls are not permitted as keys or values. A shallow reference equality check is used to prevent copying of the same value by returning this.
        Parameters:
        entries - The entries to be added to the inputSymbolToResidue map
        Returns:
        A modified copy of this object
      • equals

        public boolean equals​(@Nullable
                              Object another)
        This instance is equal to all instances of ImmutableCombinedStrandFromPdb 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: combineStrands, inputStrands, inputSymbolToResidue.
        Overrides:
        hashCode in class Object
        Returns:
        hashCode value
      • toString

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

        public List<DotBracketSymbol> symbols()

        Returns a lazily initialized value of the symbols attribute. Initialized once and only once and stored for subsequent access with proper synchronization. In case of any exception or error thrown by the lazy value initializer, the result will not be memoised (i.e. remembered) and on next call computation will be attempted again.

        Specified by:
        symbols in interface DotBracket
        Overrides:
        symbols in class CombinedStrandFromPdb
        Returns:
        A lazily initialized value of the symbols attribute
      • strands

        public List<Strand> strands()

        Returns a lazily initialized value of the strands attribute. Initialized once and only once and stored for subsequent access with proper synchronization. In case of any exception or error thrown by the lazy value initializer, the result will not be memoised (i.e. remembered) and on next call computation will be attempted again.

        Specified by:
        strands in interface DotBracket
        Overrides:
        strands in class CombinedStrandFromPdb
        Returns:
        A lazily initialized value of the strands attribute
      • pairs

        public Map<DotBracketSymbol,​DotBracketSymbol> pairs()

        Returns a lazily initialized value of the pairs attribute. Initialized once and only once and stored for subsequent access with proper synchronization. In case of any exception or error thrown by the lazy value initializer, the result will not be memoised (i.e. remembered) and on next call computation will be attempted again.

        Specified by:
        pairs in interface DotBracket
        Overrides:
        pairs in class CombinedStrandFromPdb
        Returns:
        A lazily initialized value of the pairs attribute
      • symbolToResidue

        protected Map<DotBracketSymbol,​PdbResidueIdentifier> symbolToResidue()

        Returns a lazily initialized value of the symbolToResidue attribute. Initialized once and only once and stored for subsequent access with proper synchronization. In case of any exception or error thrown by the lazy value initializer, the result will not be memoised (i.e. remembered) and on next call computation will be attempted again.

        Overrides:
        symbolToResidue in class CombinedStrandFromPdb
        Returns:
        A lazily initialized value of the symbolToResidue attribute
      • mapping

        protected org.apache.commons.collections4.BidiMap<DotBracketSymbol,​PdbResidueIdentifier> mapping()

        Returns a lazily initialized value of the mapping attribute. Initialized once and only once and stored for subsequent access with proper synchronization. In case of any exception or error thrown by the lazy value initializer, the result will not be memoised (i.e. remembered) and on next call computation will be attempted again.

        Overrides:
        mapping in class CombinedStrandFromPdb
        Returns:
        A lazily initialized value of the mapping attribute
      • of

        public static ImmutableCombinedStrandFromPdb of​(List<Strand> inputStrands,
                                                        Map<DotBracketSymbol,​PdbResidueIdentifier> inputSymbolToResidue)
        Construct a new immutable CombinedStrandFromPdb instance.
        Parameters:
        inputStrands - The value for the inputStrands attribute
        inputSymbolToResidue - The value for the inputSymbolToResidue attribute
        Returns:
        An immutable CombinedStrandFromPdb instance
      • of

        public static ImmutableCombinedStrandFromPdb of​(Iterable<? extends Strand> inputStrands,
                                                        Map<? extends DotBracketSymbol,​? extends PdbResidueIdentifier> inputSymbolToResidue)
        Construct a new immutable CombinedStrandFromPdb instance.
        Parameters:
        inputStrands - The value for the inputStrands attribute
        inputSymbolToResidue - The value for the inputSymbolToResidue attribute
        Returns:
        An immutable CombinedStrandFromPdb instance
      • copyOf

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

        public static ImmutableCombinedStrandFromPdb.Builder builder()
        Creates a builder for ImmutableCombinedStrandFromPdb.
         ImmutableCombinedStrandFromPdb.builder()
            .addCombineStrands|addAllCombineStrands(pl.poznan.put.structure.formats.DotBracket) // combineStrands elements
            .addInputStrands|addAllInputStrands(pl.poznan.put.structure.formats.Strand) // inputStrands elements
            .putInputSymbolToResidue|putAllInputSymbolToResidue(pl.poznan.put.structure.DotBracketSymbol => pl.poznan.put.pdb.PdbResidueIdentifier) // inputSymbolToResidue mappings
            .build();
         
        Returns:
        A new ImmutableCombinedStrandFromPdb builder