Class ImmutableDefaultDotBracketFromPdb

java.lang.Object
pl.poznan.put.structure.formats.DefaultDotBracketFromPdb
pl.poznan.put.structure.formats.ImmutableDefaultDotBracketFromPdb
All Implemented Interfaces:
DotBracket, DotBracketFromPdb

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

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

  • Method Details

    • identifierSet

      public Set<PdbResidueIdentifier> identifierSet()
      Returns:
      The set of residue identifiers used in this structure.
    • model

      public PdbModel model()
      Specified by:
      model in class DefaultDotBracketFromPdb
      Returns:
      The value of the model attribute
    • strands

      public List<Strand> strands()
      Specified by:
      strands in interface DotBracket
      Overrides:
      strands in class DefaultDotBracketFromPdb
      Returns:
      The value of the strands attribute
    • sequence

      public String sequence()
      Specified by:
      sequence in interface DotBracket
      Specified by:
      sequence in class DefaultDotBracketFromPdb
      Returns:
      The value of the sequence attribute
    • structure

      public String structure()
      Specified by:
      structure in interface DotBracket
      Specified by:
      structure in class DefaultDotBracketFromPdb
      Returns:
      The value of the structure attribute
    • withIdentifierSet

      public final ImmutableDefaultDotBracketFromPdb withIdentifierSet(PdbResidueIdentifier... elements)
      Copy the current immutable object with elements that replace the content of identifierSet.
      Parameters:
      elements - The elements to set
      Returns:
      A modified copy of this object
    • withIdentifierSet

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

      public final ImmutableDefaultDotBracketFromPdb withModel(PdbModel value)
      Copy the current immutable object by setting a value for the model attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for model
      Returns:
      A modified copy of the this object
    • withStrands

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

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

      public final ImmutableDefaultDotBracketFromPdb withSequence(String value)
      Copy the current immutable object by setting a value for the sequence attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for sequence
      Returns:
      A modified copy of the this object
    • withStructure

      public final ImmutableDefaultDotBracketFromPdb withStructure(String value)
      Copy the current immutable object by setting a value for the structure attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for structure
      Returns:
      A modified copy of the this object
    • equals

      public boolean equals(@Nullable Object another)
      This instance is equal to all instances of ImmutableDefaultDotBracketFromPdb 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: identifierSet, model, sequence, structure.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

      public String toString()
      Prints the immutable value DefaultDotBracketFromPdb with attribute values.
      Overrides:
      toString in class Object
      Returns:
      A string representation of the value
    • 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 DefaultDotBracketFromPdb
      Returns:
      A lazily initialized value of the pairs attribute
    • residueToSymbol

      protected Map<PdbResidueIdentifier,DotBracketSymbol> residueToSymbol()

      Returns a lazily initialized value of the residueToSymbol 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:
      residueToSymbol in class DefaultDotBracketFromPdb
      Returns:
      A lazily initialized value of the residueToSymbol 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 DefaultDotBracketFromPdb
      Returns:
      A lazily initialized value of the symbolToResidue attribute
    • of

      public static ImmutableDefaultDotBracketFromPdb of(String sequence, String structure, PdbModel model)
      Construct a new immutable DefaultDotBracketFromPdb instance.
      Parameters:
      sequence - The value for the sequence attribute
      structure - The value for the structure attribute
      model - The value for the model attribute
      Returns:
      An immutable DefaultDotBracketFromPdb instance
    • copyOf

      Creates an immutable copy of a DefaultDotBracketFromPdb 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 DefaultDotBracketFromPdb instance
    • builder

      Creates a builder for ImmutableDefaultDotBracketFromPdb.
       ImmutableDefaultDotBracketFromPdb.builder()
          .addIdentifierSet|addAllIdentifierSet(pl.poznan.put.pdb.PdbResidueIdentifier) // identifierSet elements
          .model(pl.poznan.put.pdb.analysis.PdbModel) // required model
          .addStrands|addAllStrands(pl.poznan.put.structure.formats.Strand) // strands elements
          .sequence(String) // required sequence
          .structure(String) // required structure
          .build();
       
      Returns:
      A new ImmutableDefaultDotBracketFromPdb builder
    • symbols

      public List<DotBracketSymbol> symbols()
      Specified by:
      symbols in interface DotBracket
      Returns:
      The list of dot-bracket symbols.
    • candidatesToCombine

      protected final List<List<Strand>> candidatesToCombine()