Record Class AgingStage
java.lang.Object
java.lang.Record
ke.ric.api.aging.AgingStage
public record AgingStage(String name, long durationMillis, Set<AgingCondition> conditions)
extends Record
One immutable timed stage in an aging definition.
-
Constructor Summary
ConstructorsConstructorDescriptionAgingStage(String name, long durationMillis, Set<AgingCondition> conditions) Creates an instance of aAgingStagerecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theconditionsrecord component.longReturns the value of thedurationMillisrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanmatches(AgingClimate climate) name()Returns the value of thenamerecord component.static AgingStageof(String name, long durationMillis, AgingCondition... conditions) static AgingStageof(String name, Duration duration, AgingCondition... conditions) final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
AgingStage
Creates an instance of aAgingStagerecord class.- Parameters:
name- the value for thenamerecord componentdurationMillis- the value for thedurationMillisrecord componentconditions- the value for theconditionsrecord component
-
-
Method Details
-
of
-
of
-
matches
-
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. -
name
Returns the value of thenamerecord component.- Returns:
- the value of the
namerecord component
-
durationMillis
public long durationMillis()Returns the value of thedurationMillisrecord component.- Returns:
- the value of the
durationMillisrecord component
-
conditions
Returns the value of theconditionsrecord component.- Returns:
- the value of the
conditionsrecord component
-