Package pl.poznan.put.structure
Class ImmutableBasePair
- java.lang.Object
-
- pl.poznan.put.structure.BasePair
-
- pl.poznan.put.structure.ImmutableBasePair
-
- All Implemented Interfaces:
Serializable,Comparable<BasePair>
@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable public final class ImmutableBasePair extends BasePair
Immutable implementation ofBasePair.Use the builder to create immutable instances:
ImmutableBasePair.builder(). Use the static factory method to create immutable instances:ImmutableBasePair.of().- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImmutableBasePair.BuilderBuilds instances of typeImmutableBasePair.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutableBasePair.Builderbuilder()Creates a builder forImmutableBasePair.static ImmutableBasePaircopyOf(BasePair instance)Creates an immutable copy of aBasePairvalue.booleanequals(Object another)This instance is equal to all instances ofImmutableBasePairthat have equal attribute values.inthashCode()Computes a hash code from attributes:left,right.PdbNamedResidueIdentifierleft()static ImmutableBasePairof(PdbNamedResidueIdentifier left, PdbNamedResidueIdentifier right)Construct a new immutableBasePairinstance.PdbNamedResidueIdentifierright()ImmutableBasePairwithLeft(PdbNamedResidueIdentifier value)Copy the current immutable object by setting a value for theleftattribute.ImmutableBasePairwithRight(PdbNamedResidueIdentifier value)Copy the current immutable object by setting a value for therightattribute.
-
-
-
Method Detail
-
left
public PdbNamedResidueIdentifier left()
-
right
public PdbNamedResidueIdentifier right()
-
withLeft
public final ImmutableBasePair withLeft(PdbNamedResidueIdentifier value)
Copy the current immutable object by setting a value for theleftattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for left- Returns:
- A modified copy of the
thisobject
-
withRight
public final ImmutableBasePair withRight(PdbNamedResidueIdentifier value)
Copy the current immutable object by setting a value for therightattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for right- Returns:
- A modified copy of the
thisobject
-
equals
public boolean equals(@Nullable Object another)
This instance is equal to all instances ofImmutableBasePairthat have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:left,right.
-
of
public static ImmutableBasePair of(PdbNamedResidueIdentifier left, PdbNamedResidueIdentifier right)
Construct a new immutableBasePairinstance.- Parameters:
left- The value for theleftattributeright- The value for therightattribute- Returns:
- An immutable BasePair instance
-
copyOf
public static ImmutableBasePair copyOf(BasePair instance)
Creates an immutable copy of aBasePairvalue. 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 BasePair instance
-
builder
public static ImmutableBasePair.Builder builder()
Creates a builder forImmutableBasePair.ImmutableBasePair.builder() .left(pl.poznan.put.pdb.PdbNamedResidueIdentifier) // requiredleft.right(pl.poznan.put.pdb.PdbNamedResidueIdentifier) // requiredright.build();- Returns:
- A new ImmutableBasePair builder
-
-