Record Class CorporateEventPositions.Outcome
java.lang.Object
java.lang.Record
com.quantfinlib.data.CorporateEventPositions.Outcome
- Enclosing class:
CorporateEventPositions
public static record CorporateEventPositions.Outcome(List<CorporateEventPositions.Holding> holdings, double cash)
extends Record
Result of applying an event: the resulting holdings (the original
instrument first, possibly with zero shares) and cash received.
-
Constructor Summary
ConstructorsConstructorDescriptionOutcome(List<CorporateEventPositions.Holding> holdings, double cash) Creates an instance of aOutcomerecord class. -
Method Summary
Modifier and TypeMethodDescriptiondoublecash()Returns the value of thecashrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.holdings()Returns the value of theholdingsrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Outcome
Creates an instance of aOutcomerecord class.- Parameters:
holdings- the value for theholdingsrecord componentcash- the value for thecashrecord 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. -
holdings
Returns the value of theholdingsrecord component.- Returns:
- the value of the
holdingsrecord component
-
cash
public double cash()Returns the value of thecashrecord component.- Returns:
- the value of the
cashrecord component
-