Class ImmutableAggregatePriceSet

java.lang.Object
org.xrpl.xrpl4j.model.client.oracle.ImmutableAggregatePriceSet
All Implemented Interfaces:
AggregatePriceSet

@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableAggregatePriceSet extends Object implements AggregatePriceSet
Immutable implementation of AggregatePriceSet.

Use the builder to create immutable instances: ImmutableAggregatePriceSet.builder().

  • Method Details

    • meanString

      public String meanString()
      The simple mean price.
      Specified by:
      meanString in interface AggregatePriceSet
      Returns:
      A String.
    • size

      public com.google.common.primitives.UnsignedLong size()
      The size of the data set to calculate the mean.
      Specified by:
      size in interface AggregatePriceSet
      Returns:
      An UnsignedLong.
    • standardDeviationString

      public String standardDeviationString()
      The standard deviation.
      Specified by:
      standardDeviationString in interface AggregatePriceSet
      Returns:
      A String.
    • withMeanString

      public final ImmutableAggregatePriceSet withMeanString(String value)
      Copy the current immutable object by setting a value for the meanString attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for meanString
      Returns:
      A modified copy of the this object
    • withSize

      public final ImmutableAggregatePriceSet withSize(com.google.common.primitives.UnsignedLong value)
      Copy the current immutable object by setting a value for the size attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for size
      Returns:
      A modified copy of the this object
    • withStandardDeviationString

      public final ImmutableAggregatePriceSet withStandardDeviationString(String value)
      Copy the current immutable object by setting a value for the standardDeviationString attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for standardDeviationString
      Returns:
      A modified copy of the this object
    • equals

      public boolean equals(@Nullable Object another)
      This instance is equal to all instances of ImmutableAggregatePriceSet 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: meanString, size, standardDeviationString.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

      public String toString()
      Prints the immutable value AggregatePriceSet with attribute values.
      Overrides:
      toString in class Object
      Returns:
      A string representation of the value
    • mean

      public BigDecimal mean()
      The simple mean price as a BigDecimal.

      Returns a lazily initialized value of the mean 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.

      Specified by:
      mean in interface AggregatePriceSet
      Returns:
      A lazily initialized value of the mean attribute
    • standardDeviation

      public BigDecimal standardDeviation()
      The standard deviation as a BigDecimal.

      Returns a lazily initialized value of the standardDeviation 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.

      Specified by:
      standardDeviation in interface AggregatePriceSet
      Returns:
      A lazily initialized value of the standardDeviation attribute
    • copyOf

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

      public static ImmutableAggregatePriceSet.Builder builder()
      Creates a builder for ImmutableAggregatePriceSet.
       ImmutableAggregatePriceSet.builder()
          .meanString(String) // required meanString
          .size(com.google.common.primitives.UnsignedLong) // required size
          .standardDeviationString(String) // required standardDeviationString
          .build();
       
      Returns:
      A new ImmutableAggregatePriceSet builder