Record Class PaperTradingGateway.AccountSnapshot
java.lang.Object
java.lang.Record
com.quantfinlib.trading.PaperTradingGateway.AccountSnapshot
- Enclosing class:
PaperTradingGateway
-
Constructor Summary
ConstructorsConstructorDescriptionAccountSnapshot(double cash, double equity, double realizedPnl, int rejectionCount, Map<String, Double> positions) Creates an instance of aAccountSnapshotrecord class. -
Method Summary
Modifier and TypeMethodDescriptiondoublecash()Returns the value of thecashrecord component.final booleanIndicates whether some other object is "equal to" this one.doubleequity()Returns the value of theequityrecord component.final inthashCode()Returns a hash code value for this object.Returns the value of thepositionsrecord component.doubleReturns the value of therealizedPnlrecord component.intReturns the value of therejectionCountrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
AccountSnapshot
public AccountSnapshot(double cash, double equity, double realizedPnl, int rejectionCount, Map<String, Double> positions) Creates an instance of aAccountSnapshotrecord class.- Parameters:
cash- the value for thecashrecord componentequity- the value for theequityrecord componentrealizedPnl- the value for therealizedPnlrecord componentrejectionCount- the value for therejectionCountrecord componentpositions- the value for thepositionsrecord 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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
cash
public double cash()Returns the value of thecashrecord component.- Returns:
- the value of the
cashrecord component
-
equity
public double equity()Returns the value of theequityrecord component.- Returns:
- the value of the
equityrecord component
-
realizedPnl
public double realizedPnl()Returns the value of therealizedPnlrecord component.- Returns:
- the value of the
realizedPnlrecord component
-
rejectionCount
public int rejectionCount()Returns the value of therejectionCountrecord component.- Returns:
- the value of the
rejectionCountrecord component
-
positions
-