The LegManager
class keeps track of the TradeLegs for a Trade
It remembers changes to the Legs as StructureChangedEvents, which can be
retrieved with getPendingStructureChanges and clear when processed with
clearPendingStructureChanges.
Attributes | Name and Description |
---|---|
|
caplin.trading.trademodel.LegManager()
Constructs an instance of |
Attributes | Name and Description |
---|---|
|
caplin.trading.trademodel.StructureChangedEvent
addLeg(caplin.trading.trademodel.TradeLeg oLeg, String sEventSource)
Adds a TradeLeg to this LegManager. |
|
void
clearPendingStructureChanges()
Clears the pending structure changes. |
|
caplin.trading.trademodel.TradeLeg
getLegById(Number the)
Gets the leg by its Id |
|
caplin.trading.trademodel.TradeLeg
getLegByIndex(Number the)
Gets the leg by its index. |
|
int
getLegCount()
Gets the number of legs |
|
Array
getLegs()
Gets an array of the legs. |
|
Number
getNextLegId()
Gets the next free leg id. |
|
Array
getPendingStructureChanges()
Gets an array of the pending structure changes. |
|
caplin.trading.trademodel.StructureChangedEvent
removeLeg(caplin.trading.trademodel.TradeLeg oLeg, String sEventSource)
Removes a TradeLeg from this LegManager. |
|
Array
revertStructureChanges()
Reverts all changes that took place since the last clearPendingStructureChanges call. |
►
caplin.trading.trademodel.LegManager()
Constructs an instance of caplin.trading.trademodel.LegManager
.
►
caplin.trading.trademodel.StructureChangedEvent
addLeg(caplin.trading.trademodel.TradeLeg oLeg, String sEventSource)
Adds a TradeLeg to this LegManager.
caplin.trading.trademodel.TradeLeg | oLeg | the TradeLeg to add. May not be null. |
String | sEventSource | the source of this add event. Should be one of caplin.trading.statemachine.TransitionSource |
►
void
clearPendingStructureChanges()
Clears the pending structure changes.
►
caplin.trading.trademodel.TradeLeg
getLegById(Number the)
Gets the leg by its Id
Number | the | id of the trade leg. |
►
caplin.trading.trademodel.TradeLeg
getLegByIndex(Number the)
Gets the leg by its index.
Number | the | index of the trade leg within its trade. |
►
int
getLegCount()
Gets the number of legs
►
Array
getLegs()
Gets an array of the legs.
►
Number
getNextLegId()
Gets the next free leg id.
►
Array
getPendingStructureChanges()
Gets an array of the pending structure changes.
►
caplin.trading.trademodel.StructureChangedEvent
removeLeg(caplin.trading.trademodel.TradeLeg oLeg, String sEventSource)
Removes a TradeLeg from this LegManager.
caplin.trading.trademodel.TradeLeg | oLeg | the TradeLeg to remove. May not be null. |
String | sEventSource | the source of this add event. Should be one of caplin.trading.statemachine.TransitionSource |
►
Array
revertStructureChanges()
Reverts all changes that took place since the last clearPendingStructureChanges call. After this call, there will be no pendingStructureChanges.