Package pl.poznan.put.pdb.analysis
Class ImmutableCifContainer
- java.lang.Object
-
- pl.poznan.put.pdb.analysis.CifContainer
-
- pl.poznan.put.pdb.analysis.ImmutableCifContainer
-
- All Implemented Interfaces:
Closeable,AutoCloseable,ModelContainer
@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable public final class ImmutableCifContainer extends CifContainer
Immutable implementation ofCifContainer.Use the builder to create immutable instances:
ImmutableCifContainer.builder(). Use the static factory method to create immutable instances:ImmutableCifContainer.of().
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImmutableCifContainer.BuilderBuilds instances of typeImmutableCifContainer.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutableCifContainer.Builderbuilder()Creates a builder forImmutableCifContainer.FilecifFile()static ImmutableCifContainercopyOf(CifContainer instance)Creates an immutable copy of aCifContainervalue.booleanequals(Object another)This instance is equal to all instances ofImmutableCifContainerthat have equal attribute values.Map<File,org.apache.commons.collections4.BidiMap<String,String>>fileChainMap()inthashCode()Computes a hash code from attributes:fileChainMap,cifFile.static ImmutableCifContainerof(File cifFile, Map<? extends File,? extends org.apache.commons.collections4.BidiMap<String,String>> fileChainMap)Construct a new immutableCifContainerinstance.StringtoString()Prints the immutable valueCifContainerwith attribute values.ImmutableCifContainerwithCifFile(File value)Copy the current immutable object by setting a value for thecifFileattribute.ImmutableCifContainerwithFileChainMap(Map<? extends File,? extends org.apache.commons.collections4.BidiMap<String,String>> entries)Copy the current immutable object by replacing thefileChainMapmap with the specified map.-
Methods inherited from class pl.poznan.put.pdb.analysis.CifContainer
close, convertedPdbChainName, emptyInstance, originalCifChainName, pdbFiles
-
-
-
-
Method Detail
-
fileChainMap
public Map<File,org.apache.commons.collections4.BidiMap<String,String>> fileChainMap()
- Specified by:
fileChainMapin classCifContainer- Returns:
- The mapping of chain name in PDB and mmCIF for a specific file.
-
cifFile
public File cifFile()
- Specified by:
cifFilein classCifContainer- Returns:
- The value of the
cifFileattribute,
-
withFileChainMap
public final ImmutableCifContainer withFileChainMap(Map<? extends File,? extends org.apache.commons.collections4.BidiMap<String,String>> entries)
Copy the current immutable object by replacing thefileChainMapmap 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 returningthis.- Parameters:
entries- The entries to be added to the fileChainMap map- Returns:
- A modified copy of
thisobject
-
withCifFile
public final ImmutableCifContainer withCifFile(File value)
Copy the current immutable object by setting a value for thecifFileattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for cifFile- Returns:
- A modified copy of the
thisobject
-
equals
public boolean equals(@Nullable Object another)
This instance is equal to all instances ofImmutableCifContainerthat have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:fileChainMap,cifFile.
-
toString
public String toString()
Prints the immutable valueCifContainerwith attribute values.
-
of
public static ImmutableCifContainer of(File cifFile, Map<? extends File,? extends org.apache.commons.collections4.BidiMap<String,String>> fileChainMap)
Construct a new immutableCifContainerinstance.- Parameters:
cifFile- The value for thecifFileattributefileChainMap- The value for thefileChainMapattribute- Returns:
- An immutable CifContainer instance
-
copyOf
public static ImmutableCifContainer copyOf(CifContainer instance)
Creates an immutable copy of aCifContainervalue. 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 forImmutableCifContainer.ImmutableCifContainer.builder() .putFileChainMap|putAllFileChainMap(java.io.File => org.apache.commons.collections4.BidiMap<String, String>) //fileChainMapmappings .cifFile(java.io.File) // requiredcifFile.build();- Returns:
- A new ImmutableCifContainer builder
-
-