Record Class Auction.Result
java.lang.Object
java.lang.Record
com.quantfinlib.microstructure.Auction.Result
- Enclosing class:
Auction
Auction outcome: clearing price, matched volume, and leftover imbalance.
-
Constructor Summary
ConstructorsConstructorDescriptionResult(double price, long volume, long imbalance) Creates an instance of aResultrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.booleanPositive imbalance = buy surplus, negative = sell surplus.final inthashCode()Returns a hash code value for this object.longReturns the value of theimbalancerecord component.doubleprice()Returns the value of thepricerecord component.final StringtoString()Returns a string representation of this record class.longvolume()Returns the value of thevolumerecord component.
-
Constructor Details
-
Result
public Result(double price, long volume, long imbalance) Creates an instance of aResultrecord class.- Parameters:
price- the value for thepricerecord componentvolume- the value for thevolumerecord componentimbalance- the value for theimbalancerecord component
-
-
Method Details
-
hasBuySurplus
public boolean hasBuySurplus()Positive imbalance = buy surplus, negative = sell surplus. -
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
public double price()Returns the value of thepricerecord component.- Returns:
- the value of the
pricerecord component
-
volume
public long volume()Returns the value of thevolumerecord component.- Returns:
- the value of the
volumerecord component
-
imbalance
public long imbalance()Returns the value of theimbalancerecord component.- Returns:
- the value of the
imbalancerecord component
-