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 classBuilds instances of typeImmutableTrigonometricMoment. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Creates a builder forImmutableTrigonometricMoment.static ImmutableTrigonometricMomentcopyOf(TrigonometricMoment instance) Creates an immutable copy of aTrigonometricMomentvalue.booleanThis instance is equal to all instances ofImmutableTrigonometricMomentthat have equal attribute values.inthashCode()Computes a hash code from attributes:meanDirection,meanResultantLength.doublestatic ImmutableTrigonometricMomentConstruct a new immutableTrigonometricMomentinstance.toString()Prints the immutable valueTrigonometricMomentwith attribute values.withMeanDirection(Angle value) Copy the current immutable object by setting a value for themeanDirectionattribute.withMeanResultantLength(double value) Copy the current immutable object by setting a value for themeanResultantLengthattribute.Methods inherited from class pl.poznan.put.circular.samples.TrigonometricMoment
computeCentered, computeUncentered
-
Method Details
-
meanDirection
- Specified by:
meanDirectionin classTrigonometricMoment- Returns:
- The mean direction.
-
meanResultantLength
public double meanResultantLength()- Specified by:
meanResultantLengthin classTrigonometricMoment- Returns:
- The length of the vector representing the mean direction.
-
withMeanDirection
Copy the current immutable object by setting a value for themeanDirectionattribute. 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
thisobject
-
withMeanResultantLength
Copy the current immutable object by setting a value for themeanResultantLengthattribute. 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
thisobject
-
equals
This instance is equal to all instances ofImmutableTrigonometricMomentthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:meanDirection,meanResultantLength. -
toString
Prints the immutable valueTrigonometricMomentwith attribute values. -
of
Construct a new immutableTrigonometricMomentinstance.- Parameters:
meanDirection- The value for themeanDirectionattributemeanResultantLength- The value for themeanResultantLengthattribute- Returns:
- An immutable TrigonometricMoment instance
-
copyOf
Creates an immutable copy of aTrigonometricMomentvalue. 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) // requiredmeanDirection.meanResultantLength(double) // requiredmeanResultantLength.build();- Returns:
- A new ImmutableTrigonometricMoment builder
-