Package pl.poznan.put.circular.samples
Class ImmutableTrigonometricMoment
java.lang.Object
pl.poznan.put.circular.samples.TrigonometricMoment
pl.poznan.put.circular.samples.ImmutableTrigonometricMoment
@ParametersAreNonnullByDefault
@Generated("org.immutables.processor.ProxyProcessor")
@Immutable
public final class ImmutableTrigonometricMoment
extends TrigonometricMoment
Immutable implementation of
TrigonometricMoment
.
Use the builder to create immutable instances:
ImmutableTrigonometricMoment.builder()
.
Use the static factory method to create immutable instances:
ImmutableTrigonometricMoment.of()
.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final class
Builds instances of typeImmutableTrigonometricMoment
. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()
Creates a builder forImmutableTrigonometricMoment
.static ImmutableTrigonometricMoment
copyOf
(TrigonometricMoment instance) Creates an immutable copy of aTrigonometricMoment
value.boolean
This instance is equal to all instances ofImmutableTrigonometricMoment
that have equal attribute values.int
hashCode()
Computes a hash code from attributes:meanDirection
,meanResultantLength
.double
static ImmutableTrigonometricMoment
Construct a new immutableTrigonometricMoment
instance.toString()
Prints the immutable valueTrigonometricMoment
with attribute values.withMeanDirection
(Angle value) Copy the current immutable object by setting a value for themeanDirection
attribute.withMeanResultantLength
(double value) Copy the current immutable object by setting a value for themeanResultantLength
attribute.Methods inherited from class pl.poznan.put.circular.samples.TrigonometricMoment
computeCentered, computeUncentered
-
Method Details
-
meanDirection
- Specified by:
meanDirection
in classTrigonometricMoment
- Returns:
- The mean direction.
-
meanResultantLength
public double meanResultantLength()- Specified by:
meanResultantLength
in classTrigonometricMoment
- Returns:
- The length of the vector representing the mean direction.
-
withMeanDirection
Copy the current immutable object by setting a value for themeanDirection
attribute. A shallow reference equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for meanDirection- Returns:
- A modified copy of the
this
object
-
withMeanResultantLength
Copy the current immutable object by setting a value for themeanResultantLength
attribute. A value strict bits equality used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for meanResultantLength- Returns:
- A modified copy of the
this
object
-
equals
This instance is equal to all instances ofImmutableTrigonometricMoment
that have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:meanDirection
,meanResultantLength
. -
toString
Prints the immutable valueTrigonometricMoment
with attribute values. -
of
Construct a new immutableTrigonometricMoment
instance.- Parameters:
meanDirection
- The value for themeanDirection
attributemeanResultantLength
- The value for themeanResultantLength
attribute- Returns:
- An immutable TrigonometricMoment instance
-
copyOf
Creates an immutable copy of aTrigonometricMoment
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 TrigonometricMoment instance
-
builder
Creates a builder forImmutableTrigonometricMoment
.ImmutableTrigonometricMoment.builder() .meanDirection(pl.poznan.put.circular.Angle) // required
meanDirection
.meanResultantLength(double) // requiredmeanResultantLength
.build();- Returns:
- A new ImmutableTrigonometricMoment builder
-