Class ImmutableDefaultPdbResidue

    • Method Detail

      • withIdentifier

        public final ImmutableDefaultPdbResidue withIdentifier​(PdbResidueIdentifier value)
        Copy the current immutable object by setting a value for the identifier attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for identifier
        Returns:
        A modified copy of the this object
      • withStandardResidueName

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

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

        public final ImmutableDefaultPdbResidue withAtoms​(PdbAtomLine... elements)
        Copy the current immutable object with elements that replace the content of atoms.
        Parameters:
        elements - The elements to set
        Returns:
        A modified copy of this object
      • withAtoms

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

        public boolean equals​(@Nullable
                              Object another)
        This instance is equal to all instances of ImmutableDefaultPdbResidue 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: identifier, standardResidueName, modifiedResidueName, atoms.
        Overrides:
        hashCode in class Object
        Returns:
        hashCode value
      • residueInformationProvider

        public ResidueInformationProvider residueInformationProvider()
        Detects the type of residue by its name and atom content.

        Returns a lazily initialized value of the residueInformationProvider 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:
        residueInformationProvider in interface PdbResidue
        Overrides:
        residueInformationProvider in class DefaultPdbResidue
        Returns:
        A lazily initialized value of the residueInformationProvider attribute
      • atomNames

        public Set<AtomName> atomNames()

        Returns a lazily initialized value of the atomNames 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:
        atomNames in interface PdbResidue
        Overrides:
        atomNames in class DefaultPdbResidue
        Returns:
        A lazily initialized value of the atomNames attribute
      • hasAllHeavyAtoms

        public boolean hasAllHeavyAtoms()
        Compares the set of actual atoms in this residue with the set of expected atoms derived from the detected type of residue.

        Returns a lazily initialized value of the hasAllHeavyAtoms 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:
        hasAllHeavyAtoms in interface PdbResidue
        Overrides:
        hasAllHeavyAtoms in class DefaultPdbResidue
        Returns:
        A lazily initialized value of the hasAllHeavyAtoms attribute
      • of

        public static ImmutableDefaultPdbResidue of​(PdbResidueIdentifier identifier,
                                                    String standardResidueName,
                                                    String modifiedResidueName,
                                                    List<PdbAtomLine> atoms)
        Construct a new immutable DefaultPdbResidue instance.
        Parameters:
        identifier - The value for the identifier attribute
        standardResidueName - The value for the standardResidueName attribute
        modifiedResidueName - The value for the modifiedResidueName attribute
        atoms - The value for the atoms attribute
        Returns:
        An immutable DefaultPdbResidue instance
      • of

        public static ImmutableDefaultPdbResidue of​(PdbResidueIdentifier identifier,
                                                    String standardResidueName,
                                                    String modifiedResidueName,
                                                    Iterable<? extends PdbAtomLine> atoms)
        Construct a new immutable DefaultPdbResidue instance.
        Parameters:
        identifier - The value for the identifier attribute
        standardResidueName - The value for the standardResidueName attribute
        modifiedResidueName - The value for the modifiedResidueName attribute
        atoms - The value for the atoms attribute
        Returns:
        An immutable DefaultPdbResidue instance
      • copyOf

        public static ImmutableDefaultPdbResidue copyOf​(DefaultPdbResidue instance)
        Creates an immutable copy of a DefaultPdbResidue 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 DefaultPdbResidue instance