Interface MarketSnapshotValueSource
- All Known Implementing Classes:
KlineValueSource, TickerValueSource
Common supertype for the scalar field selectors of the sealed market snapshot hierarchy:
TickerValueSource (ticker fields incl. bid/ask/vwap) and KlineValueSource (kline
OHLCV + trade stats). Lets the scalar wrapper and the indicator-group builder accept either kind.
Intentionally a marker with no extract(MarketSnapshot) method: extraction is
done by switch over the concrete enum (a tableswitch on the ordinal) rather than a
polymorphic per-constant method or stored lambda. On the hot path the scalar wrapper sees many
different sources at one call site; a virtual extract there would be megamorphic and the
JIT could not inline it, whereas a switch stays monomorphic and inlinable. See
TickerSnapshots /
KlineSnapshots for the extractors.