Class ImmutableCifContainer

    • Method Detail

      • fileChainMap

        public Map<File,​org.apache.commons.collections4.BidiMap<String,​String>> fileChainMap()
        Specified by:
        fileChainMap in class CifContainer
        Returns:
        The mapping of chain name in PDB and mmCIF for a specific file.
      • cifFile

        public File cifFile()
        Specified by:
        cifFile in class CifContainer
        Returns:
        The value of the cifFile attribute,
      • withFileChainMap

        public final ImmutableCifContainer withFileChainMap​(Map<? extends File,​? extends org.apache.commons.collections4.BidiMap<String,​String>> entries)
        Copy the current immutable object by replacing the fileChainMap 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 fileChainMap map
        Returns:
        A modified copy of this object
      • withCifFile

        public final ImmutableCifContainer withCifFile​(File value)
        Copy the current immutable object by setting a value for the cifFile attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for cifFile
        Returns:
        A modified copy of the this object
      • equals

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

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

        public static ImmutableCifContainer of​(File cifFile,
                                               Map<? extends File,​? extends org.apache.commons.collections4.BidiMap<String,​String>> fileChainMap)
        Construct a new immutable CifContainer instance.
        Parameters:
        cifFile - The value for the cifFile attribute
        fileChainMap - The value for the fileChainMap attribute
        Returns:
        An immutable CifContainer instance
      • copyOf

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

        public static ImmutableCifContainer.Builder builder()
        Creates a builder for ImmutableCifContainer.
         ImmutableCifContainer.builder()
            .putFileChainMap|putAllFileChainMap(java.io.File => org.apache.commons.collections4.BidiMap&lt;String, String&gt;) // fileChainMap mappings
            .cifFile(java.io.File) // required cifFile
            .build();
         
        Returns:
        A new ImmutableCifContainer builder