Record Class Rate
java.lang.Object
java.lang.Record
com.inductiveautomation.eventstream.designer.ui.viewmodel.diagnostics.Rate
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionRate(double rate, Rate.RateType type) Creates an instance of aRaterecord 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.doublerate()Returns the value of theraterecord component.static RatetoMeanRate(StageDiagnostics diagnostics) That is used to retrieve the appropriateRatefrom the given @StageDiagnostics.final StringtoString()Returns a string representation of this record class.type()Returns the value of thetyperecord component.
-
Constructor Details
-
Rate
Creates an instance of aRaterecord class.- Parameters:
rate- the value for theraterecord componenttype- the value for thetyperecord component
-
-
Method Details
-
toMeanRate
That is used to retrieve the appropriateRatefrom the given @StageDiagnostics.- Parameters:
diagnostics- the @StageDiagnosticsto get the mean rate from- Returns:
- the
Ratethat represents the mean rate
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
rate
public double rate()Returns the value of theraterecord component.- Returns:
- the value of the
raterecord component
-
type
Returns the value of thetyperecord component.- Returns:
- the value of the
typerecord component
-