Class ImmutableAngleSample
- java.lang.Object
-
- pl.poznan.put.circular.samples.AngleSample
-
- pl.poznan.put.circular.samples.ImmutableAngleSample
-
@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable public final class ImmutableAngleSample extends AngleSample
Immutable implementation ofAngleSample.Use the builder to create immutable instances:
ImmutableAngleSample.builder(). Use the static factory method to create immutable instances:ImmutableAngleSample.of().
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImmutableAngleSample.BuilderBuilds instances of typeImmutableAngleSample.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutableAngleSample.Builderbuilder()Creates a builder forImmutableAngleSample.doublecircularDispersion()doublecircularStandardDeviation()doublecircularVariance()protected TrigonometricMomentcm2()static ImmutableAngleSamplecopyOf(AngleSample instance)Creates an immutable copy of aAngleSamplevalue.Collection<Angle>data()booleanequals(Object another)This instance is equal to all instances ofImmutableAngleSamplethat have equal attribute values.inthashCode()Computes a hash code from attributes:data.doublekurtosis()doublemeanDeviation()AnglemeanDirection()doublemeanResultantLength()protected org.apache.commons.lang3.tuple.Pair<Angle,Double>medianAndMeanDeviation()AnglemedianDirection()static ImmutableAngleSampleof(Collection<Angle> data)Construct a new immutableAngleSampleinstance.doubleskewness()protected List<Angle>sortedData()protected TrigonometricMomentum1()protected TrigonometricMomentum2()ImmutableAngleSamplewithData(Collection<Angle> value)Copy the current immutable object by setting a value for thedataattribute.-
Methods inherited from class pl.poznan.put.circular.samples.AngleSample
check, circularRank, toString
-
-
-
-
Method Detail
-
data
public Collection<Angle> data()
- Specified by:
datain classAngleSample- Returns:
- The collection of values in the sample.
-
withData
public final ImmutableAngleSample withData(Collection<Angle> value)
Copy the current immutable object by setting a value for thedataattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for data- Returns:
- A modified copy of the
thisobject
-
equals
public boolean equals(@Nullable Object another)
This instance is equal to all instances ofImmutableAngleSamplethat have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:data.
-
meanDirection
public Angle meanDirection()
Returns a lazily initialized value of the
meanDirectionattribute. Initialized once and only once and stored for subsequent access with proper synchronization. In case of any exception or error thrown by the lazy value initializer, the result will not be memoised (i.e. remembered) and on next call computation will be attempted again.- Overrides:
meanDirectionin classAngleSample- Returns:
- A lazily initialized value of the
meanDirectionattribute
-
meanResultantLength
public double meanResultantLength()
Returns a lazily initialized value of the
meanResultantLengthattribute. Initialized once and only once and stored for subsequent access with proper synchronization. In case of any exception or error thrown by the lazy value initializer, the result will not be memoised (i.e. remembered) and on next call computation will be attempted again.- Overrides:
meanResultantLengthin classAngleSample- Returns:
- A lazily initialized value of the
meanResultantLengthattribute
-
circularVariance
public double circularVariance()
Returns a lazily initialized value of the
circularVarianceattribute. Initialized once and only once and stored for subsequent access with proper synchronization. In case of any exception or error thrown by the lazy value initializer, the result will not be memoised (i.e. remembered) and on next call computation will be attempted again.- Overrides:
circularVariancein classAngleSample- Returns:
- A lazily initialized value of the
circularVarianceattribute
-
circularStandardDeviation
public double circularStandardDeviation()
Returns a lazily initialized value of the
circularStandardDeviationattribute. Initialized once and only once and stored for subsequent access with proper synchronization. In case of any exception or error thrown by the lazy value initializer, the result will not be memoised (i.e. remembered) and on next call computation will be attempted again.- Overrides:
circularStandardDeviationin classAngleSample- Returns:
- A lazily initialized value of the
circularStandardDeviationattribute
-
circularDispersion
public double circularDispersion()
Returns a lazily initialized value of the
circularDispersionattribute. Initialized once and only once and stored for subsequent access with proper synchronization. In case of any exception or error thrown by the lazy value initializer, the result will not be memoised (i.e. remembered) and on next call computation will be attempted again.- Overrides:
circularDispersionin classAngleSample- Returns:
- A lazily initialized value of the
circularDispersionattribute
-
skewness
public double skewness()
Returns a lazily initialized value of the
skewnessattribute. Initialized once and only once and stored for subsequent access with proper synchronization. In case of any exception or error thrown by the lazy value initializer, the result will not be memoised (i.e. remembered) and on next call computation will be attempted again.- Overrides:
skewnessin classAngleSample- Returns:
- A lazily initialized value of the
skewnessattribute
-
kurtosis
public double kurtosis()
Returns a lazily initialized value of the
kurtosisattribute. Initialized once and only once and stored for subsequent access with proper synchronization. In case of any exception or error thrown by the lazy value initializer, the result will not be memoised (i.e. remembered) and on next call computation will be attempted again.- Overrides:
kurtosisin classAngleSample- Returns:
- A lazily initialized value of the
kurtosisattribute
-
medianDirection
public Angle medianDirection()
Returns a lazily initialized value of the
medianDirectionattribute. Initialized once and only once and stored for subsequent access with proper synchronization. In case of any exception or error thrown by the lazy value initializer, the result will not be memoised (i.e. remembered) and on next call computation will be attempted again.- Overrides:
medianDirectionin classAngleSample- Returns:
- A lazily initialized value of the
medianDirectionattribute
-
meanDeviation
public double meanDeviation()
Returns a lazily initialized value of the
meanDeviationattribute. Initialized once and only once and stored for subsequent access with proper synchronization. In case of any exception or error thrown by the lazy value initializer, the result will not be memoised (i.e. remembered) and on next call computation will be attempted again.- Overrides:
meanDeviationin classAngleSample- Returns:
- A lazily initialized value of the
meanDeviationattribute
-
medianAndMeanDeviation
protected org.apache.commons.lang3.tuple.Pair<Angle,Double> medianAndMeanDeviation()
Returns a lazily initialized value of the
medianAndMeanDeviationattribute. Initialized once and only once and stored for subsequent access with proper synchronization. In case of any exception or error thrown by the lazy value initializer, the result will not be memoised (i.e. remembered) and on next call computation will be attempted again.- Overrides:
medianAndMeanDeviationin classAngleSample- Returns:
- A lazily initialized value of the
medianAndMeanDeviationattribute
-
sortedData
protected List<Angle> sortedData()
Returns a lazily initialized value of the
sortedDataattribute. Initialized once and only once and stored for subsequent access with proper synchronization. In case of any exception or error thrown by the lazy value initializer, the result will not be memoised (i.e. remembered) and on next call computation will be attempted again.- Overrides:
sortedDatain classAngleSample- Returns:
- A lazily initialized value of the
sortedDataattribute
-
um1
protected TrigonometricMoment um1()
Returns a lazily initialized value of the
um1attribute. Initialized once and only once and stored for subsequent access with proper synchronization. In case of any exception or error thrown by the lazy value initializer, the result will not be memoised (i.e. remembered) and on next call computation will be attempted again.- Overrides:
um1in classAngleSample- Returns:
- A lazily initialized value of the
um1attribute
-
cm2
protected TrigonometricMoment cm2()
Returns a lazily initialized value of the
cm2attribute. Initialized once and only once and stored for subsequent access with proper synchronization. In case of any exception or error thrown by the lazy value initializer, the result will not be memoised (i.e. remembered) and on next call computation will be attempted again.- Overrides:
cm2in classAngleSample- Returns:
- A lazily initialized value of the
cm2attribute
-
um2
protected TrigonometricMoment um2()
Returns a lazily initialized value of the
um2attribute. Initialized once and only once and stored for subsequent access with proper synchronization. In case of any exception or error thrown by the lazy value initializer, the result will not be memoised (i.e. remembered) and on next call computation will be attempted again.- Overrides:
um2in classAngleSample- Returns:
- A lazily initialized value of the
um2attribute
-
of
public static ImmutableAngleSample of(Collection<Angle> data)
Construct a new immutableAngleSampleinstance.- Parameters:
data- The value for thedataattribute- Returns:
- An immutable AngleSample instance
-
copyOf
public static ImmutableAngleSample copyOf(AngleSample instance)
Creates an immutable copy of aAngleSamplevalue. 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 AngleSample instance
-
builder
public static ImmutableAngleSample.Builder builder()
Creates a builder forImmutableAngleSample.ImmutableAngleSample.builder() .data(Collection<pl.poznan.put.circular.Angle>) // requireddata.build();- Returns:
- A new ImmutableAngleSample builder
-
-