Record Class OrderBook.PriceLevel
java.lang.Object
java.lang.Record
eds.model.OrderBook.PriceLevel
- Record Components:
price- the price of the leveltotalQty- total remaining quantity at that priceorderCount- number of orders at the level
- Enclosing class:
OrderBook
public static record OrderBook.PriceLevel(double price, int totalQty, int orderCount)
extends Record
Aggregated representation of a single price level.
-
Constructor Summary
ConstructorsConstructorDescriptionPriceLevel(double price, int totalQty, int orderCount) Creates an instance of aPriceLevelrecord 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.intReturns the value of theorderCountrecord component.doubleprice()Returns the value of thepricerecord component.final StringtoString()Returns a string representation of this record class.inttotalQty()Returns the value of thetotalQtyrecord component.
-
Constructor Details
-
PriceLevel
public PriceLevel(double price, int totalQty, int orderCount) Creates an instance of aPriceLevelrecord class.- Parameters:
price- the value for thepricerecord componenttotalQty- the value for thetotalQtyrecord componentorderCount- the value for theorderCountrecord component
-
-
Method Details
-
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. -
price
-
totalQty
-
orderCount
public int orderCount()Returns the value of theorderCountrecord component.- Returns:
- the value of the
orderCountrecord component
-