Record Class OrderPlacementPolicy.Placement
java.lang.Object
java.lang.Record
com.quantfinlib.execution.OrderPlacementPolicy.Placement
- Enclosing class:
OrderPlacementPolicy
public static record OrderPlacementPolicy.Placement(boolean post, double expectedPostCost, double crossCost)
extends Record
The decision plus the arithmetic that made it.
-
Constructor Summary
ConstructorsConstructorDescriptionPlacement(boolean post, double expectedPostCost, double crossCost) Creates an instance of aPlacementrecord class. -
Method Summary
Modifier and TypeMethodDescriptiondoubleReturns the value of thecrossCostrecord component.final booleanIndicates whether some other object is "equal to" this one.doubleReturns the value of theexpectedPostCostrecord component.final inthashCode()Returns a hash code value for this object.booleanpost()Returns the value of thepostrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Placement
public Placement(boolean post, double expectedPostCost, double crossCost) Creates an instance of aPlacementrecord class.- Parameters:
post- the value for thepostrecord componentexpectedPostCost- the value for theexpectedPostCostrecord componentcrossCost- the value for thecrossCostrecord 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. -
post
public boolean post()Returns the value of thepostrecord component.- Returns:
- the value of the
postrecord component
-
expectedPostCost
public double expectedPostCost()Returns the value of theexpectedPostCostrecord component.- Returns:
- the value of the
expectedPostCostrecord component
-
crossCost
public double crossCost()Returns the value of thecrossCostrecord component.- Returns:
- the value of the
crossCostrecord component
-