Package edu.yu.marketmaker.model
Record Class ExposureState
java.lang.Object
java.lang.Record
edu.yu.marketmaker.model.ExposureState
public record ExposureState(int currentUsage, int totalCapacity, int activeReservations)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionExposureState(int currentUsage, int totalCapacity, int activeReservations) Creates an instance of aExposureStaterecord class. -
Method Summary
Modifier and TypeMethodDescriptionintReturns the value of theactiveReservationsrecord component.intReturns the value of thecurrentUsagerecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.intReturns the value of thetotalCapacityrecord component.
-
Constructor Details
-
ExposureState
public ExposureState(int currentUsage, int totalCapacity, int activeReservations) Creates an instance of aExposureStaterecord class.- Parameters:
currentUsage- the value for thecurrentUsagerecord componenttotalCapacity- the value for thetotalCapacityrecord componentactiveReservations- the value for theactiveReservationsrecord 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 '=='. -
currentUsage
public int currentUsage()Returns the value of thecurrentUsagerecord component.- Returns:
- the value of the
currentUsagerecord component
-
totalCapacity
public int totalCapacity()Returns the value of thetotalCapacityrecord component.- Returns:
- the value of the
totalCapacityrecord component
-
activeReservations
public int activeReservations()Returns the value of theactiveReservationsrecord component.- Returns:
- the value of the
activeReservationsrecord component
-