Enum Class Side
- All Implemented Interfaces:
Serializable, Comparable<Side>, Constable
Order side. Until 2.4 this was
com.quantfinlib.orderbook.Side; it moved
to core in 3.0 because stable packages (execution,
backtest, microstructure, regulatory, risk) take
it in their signatures while orderbook moved to the low-latency module
(docs/MIGRATION_3.0.md, section 8). Constants and methods are unchanged.-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E> -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionopposite()The other side: SELL for BUY, BUY for SELL.intsign()+1 for BUY, -1 for SELL — for signed cost/slippage arithmetic.static SideReturns the enum constant of this class with the specified name.static Side[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
BUY
-
SELL
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
sign
public int sign()+1 for BUY, -1 for SELL — for signed cost/slippage arithmetic. -
opposite
The other side: SELL for BUY, BUY for SELL.
-