Package dev.tripswitch
Record Class Status
java.lang.Object
java.lang.Record
dev.tripswitch.Status
- Record Components:
openCount- number of open breakersclosedCount- number of closed breakerslastEvalMs- timestamp of last evaluation in epoch milliseconds
Project health status returned by the API.
-
Constructor Summary
ConstructorsConstructorDescriptionStatus(int openCount, int closedCount, long lastEvalMs) Creates an instance of aStatusrecord class. -
Method Summary
Modifier and TypeMethodDescriptionintReturns the value of theclosedCountrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.longReturns the value of thelastEvalMsrecord component.intReturns the value of theopenCountrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Status
public Status(int openCount, int closedCount, long lastEvalMs) Creates an instance of aStatusrecord class.- Parameters:
openCount- the value for theopenCountrecord componentclosedCount- the value for theclosedCountrecord componentlastEvalMs- the value for thelastEvalMsrecord component
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
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 '=='. -
openCount
public int openCount()Returns the value of theopenCountrecord component.- Returns:
- the value of the
openCountrecord component
-
closedCount
public int closedCount()Returns the value of theclosedCountrecord component.- Returns:
- the value of the
closedCountrecord component
-
lastEvalMs
public long lastEvalMs()Returns the value of thelastEvalMsrecord component.- Returns:
- the value of the
lastEvalMsrecord component
-