This class keeps references associated with specific characters
Description
The CharReferenceMap class allows you to keep references associated with specific characters.
Constructors
Creates a new instance of this class.
publicCharReferenceMap()
Instance methods
addDefaultInterval
Adds a default interval.
publicvoid addDefaultInterval(T reference) throws Exception
- reference: T - reference
addInterval
Adds an interval.
publicvoid addInterval(int start, int end, T reference) throws Exception
- start: int - start of the interval
- end: int - end of the interval
- reference: T - reference
clear
Clears up the intervals.
publicvoid clear()
lookup
Looks up for a specified symbol.
publicT lookup(int symbol)
- symbol: int - symbol
- returns: T - reference