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 of AngleSample.

Use the builder to create immutable instances: ImmutableAngleSample.builder(). Use the static factory method to create immutable instances: ImmutableAngleSample.of().

  • Method Details

    • data

      public Collection<Angle> data()
      Specified by:
      data in class AngleSample
      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 the data attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for data
      Returns:
      A modified copy of the this object
    • equals

      public boolean equals(@Nullable Object another)
      This instance is equal to all instances of ImmutableAngleSample that have equal attribute values.
      Overrides:
      equals in class Object
      Returns:
      true if this is equal to another instance
    • hashCode

      public int hashCode()
      Computes a hash code from attributes: data.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • meanDirection

      public Angle meanDirection()

      Returns a lazily initialized value of the meanDirection attribute. 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:
      meanDirection in class AngleSample
      Returns:
      A lazily initialized value of the meanDirection attribute
    • meanResultantLength

      public double meanResultantLength()

      Returns a lazily initialized value of the meanResultantLength attribute. 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:
      meanResultantLength in class AngleSample
      Returns:
      A lazily initialized value of the meanResultantLength attribute
    • circularVariance

      public double circularVariance()

      Returns a lazily initialized value of the circularVariance attribute. 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:
      circularVariance in class AngleSample
      Returns:
      A lazily initialized value of the circularVariance attribute
    • circularStandardDeviation

      public double circularStandardDeviation()

      Returns a lazily initialized value of the circularStandardDeviation attribute. 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:
      circularStandardDeviation in class AngleSample
      Returns:
      A lazily initialized value of the circularStandardDeviation attribute
    • circularDispersion

      public double circularDispersion()

      Returns a lazily initialized value of the circularDispersion attribute. 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:
      circularDispersion in class AngleSample
      Returns:
      A lazily initialized value of the circularDispersion attribute
    • skewness

      public double skewness()

      Returns a lazily initialized value of the skewness attribute. 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:
      skewness in class AngleSample
      Returns:
      A lazily initialized value of the skewness attribute
    • kurtosis

      public double kurtosis()

      Returns a lazily initialized value of the kurtosis attribute. 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:
      kurtosis in class AngleSample
      Returns:
      A lazily initialized value of the kurtosis attribute
    • medianDirection

      public Angle medianDirection()

      Returns a lazily initialized value of the medianDirection attribute. 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:
      medianDirection in class AngleSample
      Returns:
      A lazily initialized value of the medianDirection attribute
    • meanDeviation

      public double meanDeviation()

      Returns a lazily initialized value of the meanDeviation attribute. 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:
      meanDeviation in class AngleSample
      Returns:
      A lazily initialized value of the meanDeviation attribute
    • medianAndMeanDeviation

      protected org.apache.commons.lang3.tuple.Pair<Angle,Double> medianAndMeanDeviation()

      Returns a lazily initialized value of the medianAndMeanDeviation attribute. 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:
      medianAndMeanDeviation in class AngleSample
      Returns:
      A lazily initialized value of the medianAndMeanDeviation attribute
    • sortedData

      protected List<Angle> sortedData()

      Returns a lazily initialized value of the sortedData attribute. 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:
      sortedData in class AngleSample
      Returns:
      A lazily initialized value of the sortedData attribute
    • um1

      protected TrigonometricMoment um1()

      Returns a lazily initialized value of the um1 attribute. 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:
      um1 in class AngleSample
      Returns:
      A lazily initialized value of the um1 attribute
    • cm2

      protected TrigonometricMoment cm2()

      Returns a lazily initialized value of the cm2 attribute. 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:
      cm2 in class AngleSample
      Returns:
      A lazily initialized value of the cm2 attribute
    • um2

      protected TrigonometricMoment um2()

      Returns a lazily initialized value of the um2 attribute. 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:
      um2 in class AngleSample
      Returns:
      A lazily initialized value of the um2 attribute
    • of

      public static ImmutableAngleSample of(Collection<Angle> data)
      Construct a new immutable AngleSample instance.
      Parameters:
      data - The value for the data attribute
      Returns:
      An immutable AngleSample instance
    • copyOf

      public static ImmutableAngleSample copyOf(AngleSample instance)
      Creates an immutable copy of a AngleSample 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 AngleSample instance
    • builder

      public static ImmutableAngleSample.Builder builder()
      Creates a builder for ImmutableAngleSample.
       ImmutableAngleSample.builder()
          .data(Collection&lt;pl.poznan.put.circular.Angle&gt;) // required data
          .build();
       
      Returns:
      A new ImmutableAngleSample builder