Class ImmutableCombinedStrandFromPdb

All Implemented Interfaces:
DotBracket, DotBracketFromPdb

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

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

  • Method Details

    • inputStrands

      protected List<Strand> inputStrands()
      Specified by:
      inputStrands in class CombinedStrandFromPdb
      Returns:
      The list of input strands.
    • inputSymbolToResidue

      protected Map<DotBracketSymbol,PdbResidueIdentifier> inputSymbolToResidue()
      Specified by:
      inputSymbolToResidue in class CombinedStrandFromPdb
      Returns:
      The mapping of dot-bracket symbols with corresponding PDB identifiers.
    • 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: 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

      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()
          .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