Class IndicatorMeta
Everything that used to be smuggled into the name — the "%" display suffix, the
Upper/Lower/BW band suffixes, the rsi/dist/chg
prefixes and the parameter digits — is carried here as small key=value entries instead, so a
stored column like blgr13_2Upper is decodable without insider knowledge of the naming
convention: id=bollinger, periods=13, k=2, band=upper.
Wire-compact from birth. The frame keys (ID, DISPLAY, SOURCE,
NAME) use their short serialized spelling directly — what is in memory is what lands as
per-column metadata in the storage layer (lastra) with no mapping layer to drift. Parameter keys
(periods, k, band, …) deliberately keep their natural names: they are the
same identifiers the strategy-IR catalog uses, and that convergence matters more than a few bytes.
Write-only descriptor, never configuration. Indicators must never read their own metadata to drive a computation — it describes what was built, it does not parameterize it. A value read back into the math would turn this into a second, undeclared configuration system.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringDisplay hint wire key.static final IndicatorMetaThe shared immutable empty metadata, returned by indicators that carry none.static final StringVISIBILITYvalue for an internal indicator: updated, but its value is not emitted.static final StringCanonical indicator type id — the strategy-IR catalog vocabulary (bollinger,rsi, …).static final StringOptional user-facing label (Bol1), distinct from the lookup name.static final StringThe indicator another one derives from (distanceMa,percentChange, bandwidth…).static final StringVisibility wire key. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionasMap()The entries as an unmodifiable, insertion-ordered map — ready for per-column serialization.static StringDerives a canonical id from an indicator class name: strip theRTIndicatorsuffix and lower-case the first letter —RsiRTIndicator→"rsi",SumRTIndicator→"sum".The typed view of theDISPLAYentry; absent =DisplayHint.ABSOLUTE.displayHint(DisplayHint displayHint) Sets theDISPLAYentry from its typed form.hidden(boolean hidden) SetsVISIBILITY;false(public) removes the entry — the default is absence.booleanisEmpty()booleanisHidden()Whether this describes an internal indicator that is updated but not emitted (default false).Sets one metadata entry.toString()
-
Field Details
-
ID
Canonical indicator type id — the strategy-IR catalog vocabulary (bollinger,rsi, …). An explicit override: it is set only whenRTIndicator.getId()'s class-name derivation would be wrong (a renamed type, or an instance registered wrapped in a generic decorator). Read it throughgetId(), which falls back to the derivation — not from the map directly, or a derived id looks absent.- See Also:
-
DISPLAY
Display hint wire key. Values areDisplayHintcodes (P,V); an absent entry meansDisplayHint.ABSOLUTE, so the default costs no bytes.- See Also:
-
SOURCE
The indicator another one derives from (distanceMa,percentChange, bandwidth…).- See Also:
-
NAME
Optional user-facing label (Bol1), distinct from the lookup name.- See Also:
-
VISIBILITY
-
HIDDEN
VISIBILITYvalue for an internal indicator: updated, but its value is not emitted.- See Also:
-
EMPTY
The shared immutable empty metadata, returned by indicators that carry none. Mutators throw.
-
-
Constructor Details
-
IndicatorMeta
public IndicatorMeta()
-
-
Method Details
-
put
Sets one metadata entry. The value is stored as its string form — this map is the wire form.- Parameters:
key- the entry key (a frame-key constant, or a natural parameter name)value- the value; stored viaString.valueOf(Object)- Returns:
- this metadata, for chaining
-
get
-
isEmpty
public boolean isEmpty() -
asMap
-
displayHint
The typed view of theDISPLAYentry; absent =DisplayHint.ABSOLUTE. -
isHidden
public boolean isHidden()Whether this describes an internal indicator that is updated but not emitted (default false). -
displayHint
Sets theDISPLAYentry from its typed form.DisplayHint.ABSOLUTE(or null) removes the entry — the default is expressed by absence. -
toString
-
deriveId
Derives a canonical id from an indicator class name: strip theRTIndicatorsuffix and lower-case the first letter —RsiRTIndicator→"rsi",SumRTIndicator→"sum". This is the defaultRTIndicator.getId()returns; a class whose canonical id differs from its name (e.g.BollingerBandsRTIndicator→"bollinger"), or an instance registered wrapped in a generic decorator, carries an explicitIDentry that wins over this.- Parameters:
type- the indicator's runtime class- Returns:
- the derived id
-