Record Class PercentileParams
java.lang.Object
java.lang.Record
com.inductiveautomation.historian.common.model.options.PercentileParams
- All Implemented Interfaces:
AggregateParams
Parameters of a single-percentile aggregate such as APPROX_PERCENTILE.
p must lie in [0,
1]; construction validates it.
Thread-safe: immutable record.
-
Constructor Summary
ConstructorsConstructorDescriptionPercentileParams(double p) Creates an instance of aPercentileParamsrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.static PercentileParamsmedian()Returns the median parameters,p = 0.5.doublep()Returns the value of theprecord component.final StringtoString()Returns a string representation of this record class.Methods inherited from interface AggregateParams
toMap
-
Constructor Details
-
PercentileParams
public PercentileParams(double p) Creates an instance of aPercentileParamsrecord class.- Parameters:
p- the value for theprecord component
-
-
Method Details
-
median
Returns the median parameters,p = 0.5.- Returns:
- the parameters.
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with thecomparemethod from their corresponding wrapper classes. -
p
public double p()Returns the value of theprecord component.- Returns:
- the value of the
precord component
-