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 ofBondLength.Use the builder to create immutable instances:
ImmutableBondLength.builder(). Use the static factory method to create immutable instances:ImmutableBondLength.of().
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImmutableBondLength.BuilderBuilds instances of typeImmutableBondLength.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description doubleavg()static ImmutableBondLength.Builderbuilder()Creates a builder forImmutableBondLength.static ImmutableBondLengthcopyOf(BondLength instance)Creates an immutable copy of aBondLengthvalue.booleanequals(Object another)This 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.StringtoString()Prints the immutable valueBondLengthwith attribute values.ImmutableBondLengthwithAvg(double value)Copy the current immutable object by setting a value for theavgattribute.ImmutableBondLengthwithMax(double value)Copy the current immutable object by setting a value for themaxattribute.ImmutableBondLengthwithMin(double value)Copy the current immutable object by setting a value for theminattribute.
-
-
-
Method Detail
-
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
public final ImmutableBondLength withMin(double value)
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
public final ImmutableBondLength withMax(double value)
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
public final ImmutableBondLength withAvg(double value)
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
public boolean equals(@Nullable Object another)
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
public String toString()
Prints the immutable valueBondLengthwith attribute values.
-
of
public static ImmutableBondLength of(double min, double max, double avg)
Construct a new immutableBondLengthinstance.- Parameters:
min- The value for theminattributemax- The value for themaxattributeavg- The value for theavgattribute- Returns:
- An immutable BondLength instance
-
copyOf
public static ImmutableBondLength copyOf(BondLength instance)
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
public static ImmutableBondLength.Builder builder()
Creates a builder forImmutableBondLength.ImmutableBondLength.builder() .min(double) // requiredmin.max(double) // requiredmax.avg(double) // requiredavg.build();- Returns:
- A new ImmutableBondLength builder
-
-