Class EquitiesRunTimeDataBase<EquityStateType extends InstrumentState>

  • Direct Known Subclasses:
    OptionsRunTimeDataBase

    public class EquitiesRunTimeDataBase<EquityStateType extends InstrumentState>
    extends java.lang.Object

    A run-time database capable of holing information about equities. Provides extremely fast lookup capability. This class can be extended to add fields to the objects it can hold, as well as to hold additional types objects.

    This class is not thread-safe

    • Constructor Detail

      • EquitiesRunTimeDataBase

        public EquitiesRunTimeDataBase()
    • Method Detail

      • equities

        public final java.util.Collection<EquityStateType> equities()
        Returns a read-only collection of all equity states.
      • createEquityState

        protected EquityStateType createEquityState​(java.lang.String symbol)
        Override to create a subclass of InstrumentState.
      • clearAll

        public void clearAll()
        Clear the entire database.
      • getEquityState

        public final EquityStateType getEquityState​(java.lang.CharSequence symbol)
        Look up an equity state by symbol.
        Parameters:
        symbol - The ticker
        Returns:
        Equity state object, or null if not found.
      • getOrCreateEquityState

        public final EquityStateType getOrCreateEquityState​(java.lang.CharSequence symbol)
        Look up an equity state by symbol, or add one to database if it does not exist.
        Parameters:
        symbol - The ticker
        Returns:
        Equity state object.