Package pl.poznan.put.atom
Class ImmutableBondLength
java.lang.Object
pl.poznan.put.atom.ImmutableBondLength
- All Implemented Interfaces:
BondLength
@ParametersAreNonnullByDefault
@Generated("org.immutables.processor.ProxyProcessor")
@Immutable
public final class ImmutableBondLength
extends Object
implements BondLength
Immutable implementation of
BondLength.
Use the builder to create immutable instances:
ImmutableBondLength.builder().
Use the static factory method to create immutable instances:
ImmutableBondLength.of().
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeImmutableBondLength. -
Method Summary
Modifier and TypeMethodDescriptiondoubleavg()static ImmutableBondLength.Builderbuilder()Creates a builder forImmutableBondLength.static ImmutableBondLengthcopyOf(BondLength instance) Creates an immutable copy of aBondLengthvalue.booleanThis instance is equal to all instances ofImmutableBondLengththat have equal attribute values.inthashCode()Computes a hash code from attributes:min,max,avg.doublemax()doublemin()static ImmutableBondLengthof(double min, double max, double avg) Construct a new immutableBondLengthinstance.toString()Prints the immutable valueBondLengthwith attribute values.final ImmutableBondLengthwithAvg(double value) Copy the current immutable object by setting a value for theavgattribute.final ImmutableBondLengthwithMax(double value) Copy the current immutable object by setting a value for themaxattribute.final ImmutableBondLengthwithMin(double value) Copy the current immutable object by setting a value for theminattribute.
-
Method Details
-
min
public double min()- Specified by:
minin interfaceBondLength- Returns:
- The minimum length.
-
max
public double max()- Specified by:
maxin interfaceBondLength- Returns:
- The maximum length.
-
avg
public double avg()- Specified by:
avgin interfaceBondLength- Returns:
- The average length.
-
withMin
Copy the current immutable object by setting a value for theminattribute. A value strict bits equality used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for min- Returns:
- A modified copy of the
thisobject
-
withMax
Copy the current immutable object by setting a value for themaxattribute. A value strict bits equality used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for max- Returns:
- A modified copy of the
thisobject
-
withAvg
Copy the current immutable object by setting a value for theavgattribute. A value strict bits equality used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for avg- Returns:
- A modified copy of the
thisobject
-
equals
This instance is equal to all instances ofImmutableBondLengththat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:min,max,avg. -
toString
Prints the immutable valueBondLengthwith attribute values. -
of
Construct a new immutableBondLengthinstance.- Parameters:
min- The value for theminattributemax- The value for themaxattributeavg- The value for theavgattribute- Returns:
- An immutable BondLength instance
-
copyOf
Creates an immutable copy of aBondLengthvalue. 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 BondLength instance
-
builder
Creates a builder forImmutableBondLength.ImmutableBondLength.builder() .min(double) // requiredmin.max(double) // requiredmax.avg(double) // requiredavg.build();- Returns:
- A new ImmutableBondLength builder
-