Package pl.poznan.put.pdb.analysis
Class ImmutableDefaultResidueCollection
- java.lang.Object
-
- pl.poznan.put.pdb.analysis.DefaultResidueCollection
-
- pl.poznan.put.pdb.analysis.ImmutableDefaultResidueCollection
-
- All Implemented Interfaces:
Serializable,ResidueCollection
@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable public final class ImmutableDefaultResidueCollection extends DefaultResidueCollection
Immutable implementation ofDefaultResidueCollection.Use the builder to create immutable instances:
ImmutableDefaultResidueCollection.builder(). Use the static factory method to create immutable instances:ImmutableDefaultResidueCollection.of().- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImmutableDefaultResidueCollection.BuilderBuilds instances of typeImmutableDefaultResidueCollection.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutableDefaultResidueCollection.Builderbuilder()Creates a builder forImmutableDefaultResidueCollection.static ImmutableDefaultResidueCollectioncopyOf(DefaultResidueCollection instance)Creates an immutable copy of aDefaultResidueCollectionvalue.booleanequals(Object another)This instance is equal to all instances ofImmutableDefaultResidueCollectionthat have equal attribute values.inthashCode()Computes a hash code from attributes:residues.static ImmutableDefaultResidueCollectionof(Iterable<? extends PdbResidue> residues)Construct a new immutableDefaultResidueCollectioninstance.static ImmutableDefaultResidueCollectionof(List<PdbResidue> residues)Construct a new immutableDefaultResidueCollectioninstance.List<PdbResidue>residues()StringtoString()Prints the immutable valueDefaultResidueCollectionwith attribute values.ImmutableDefaultResidueCollectionwithResidues(Iterable<? extends PdbResidue> elements)Copy the current immutable object with elements that replace the content ofresidues.ImmutableDefaultResidueCollectionwithResidues(PdbResidue... elements)Copy the current immutable object with elements that replace the content ofresidues.-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface pl.poznan.put.pdb.analysis.ResidueCollection
filteredAtoms, findBondLengthViolations, findResidue, hasResidue, indexOf, namedResidueIdentifiers, residueIdentifiers, sequence, toCif, toPdb, withoutAlternateLocations
-
-
-
-
Method Detail
-
residues
public List<PdbResidue> residues()
- Specified by:
residuesin interfaceResidueCollection- Specified by:
residuesin classDefaultResidueCollection- Returns:
- The value of the
residuesattribute
-
withResidues
public final ImmutableDefaultResidueCollection withResidues(PdbResidue... elements)
Copy the current immutable object with elements that replace the content ofresidues.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withResidues
public final ImmutableDefaultResidueCollection withResidues(Iterable<? extends PdbResidue> elements)
Copy the current immutable object with elements that replace the content ofresidues. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of residues elements to set- Returns:
- A modified copy of
thisobject
-
equals
public boolean equals(@Nullable Object another)
This instance is equal to all instances ofImmutableDefaultResidueCollectionthat have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:residues.
-
toString
public String toString()
Prints the immutable valueDefaultResidueCollectionwith attribute values.
-
of
public static ImmutableDefaultResidueCollection of(List<PdbResidue> residues)
Construct a new immutableDefaultResidueCollectioninstance.- Parameters:
residues- The value for theresiduesattribute- Returns:
- An immutable DefaultResidueCollection instance
-
of
public static ImmutableDefaultResidueCollection of(Iterable<? extends PdbResidue> residues)
Construct a new immutableDefaultResidueCollectioninstance.- Parameters:
residues- The value for theresiduesattribute- Returns:
- An immutable DefaultResidueCollection instance
-
copyOf
public static ImmutableDefaultResidueCollection copyOf(DefaultResidueCollection instance)
Creates an immutable copy of aDefaultResidueCollectionvalue. 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 DefaultResidueCollection instance
-
builder
public static ImmutableDefaultResidueCollection.Builder builder()
Creates a builder forImmutableDefaultResidueCollection.ImmutableDefaultResidueCollection.builder() .addResidues|addAllResidues(pl.poznan.put.pdb.analysis.PdbResidue) //residueselements .build();- Returns:
- A new ImmutableDefaultResidueCollection builder
-
-