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 class
Builds instances of typeImmutableBondLength
. -
Method Summary
Modifier and TypeMethodDescriptiondouble
avg()
static ImmutableBondLength.Builder
builder()
Creates a builder forImmutableBondLength
.static ImmutableBondLength
copyOf
(BondLength instance) Creates an immutable copy of aBondLength
value.boolean
This instance is equal to all instances ofImmutableBondLength
that have equal attribute values.int
hashCode()
Computes a hash code from attributes:min
,max
,avg
.double
max()
double
min()
static ImmutableBondLength
of
(double min, double max, double avg) Construct a new immutableBondLength
instance.toString()
Prints the immutable valueBondLength
with attribute values.final ImmutableBondLength
withAvg
(double value) Copy the current immutable object by setting a value for theavg
attribute.final ImmutableBondLength
withMax
(double value) Copy the current immutable object by setting a value for themax
attribute.final ImmutableBondLength
withMin
(double value) Copy the current immutable object by setting a value for themin
attribute.
-
Method Details
-
min
public double min()- Specified by:
min
in interfaceBondLength
- Returns:
- The minimum length.
-
max
public double max()- Specified by:
max
in interfaceBondLength
- Returns:
- The maximum length.
-
avg
public double avg()- Specified by:
avg
in interfaceBondLength
- Returns:
- The average length.
-
withMin
Copy the current immutable object by setting a value for themin
attribute. 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
this
object
-
withMax
Copy the current immutable object by setting a value for themax
attribute. 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
this
object
-
withAvg
Copy the current immutable object by setting a value for theavg
attribute. 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
this
object
-
equals
This instance is equal to all instances ofImmutableBondLength
that have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:min
,max
,avg
. -
toString
Prints the immutable valueBondLength
with attribute values. -
of
Construct a new immutableBondLength
instance.- Parameters:
min
- The value for themin
attributemax
- The value for themax
attributeavg
- The value for theavg
attribute- Returns:
- An immutable BondLength instance
-
copyOf
Creates an immutable copy of aBondLength
value. 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) // required
min
.max(double) // requiredmax
.avg(double) // requiredavg
.build();- Returns:
- A new ImmutableBondLength builder
-