-
- All Superinterfaces:
DocumentContext,GraphContext
- All Known Subinterfaces:
MutableContext
public interface Context extends GraphContext, DocumentContext
A semantic context for subsequent contents
-
-
Field Summary
Fields Modifier and Type Field Description static intDEFAULT_LEVELstatic String[]EMPTY_CONTEXT-
Fields inherited from interface io.fixprotocol.md.event.DocumentContext
UNKNOWN_POSITION
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description StringgetKey(int position)Returns a key by its positionString[]getKeys()An array of keywords.StringgetKeyValue(String key)Returns a value assuming that context keys are formed as key-value pairs (possibly after positional keys)intgetLevel()-
Methods inherited from interface io.fixprotocol.md.event.DocumentContext
getCharPositionInLine, getLine
-
Methods inherited from interface io.fixprotocol.md.event.GraphContext
getParent
-
-
-
-
Field Detail
-
DEFAULT_LEVEL
static final int DEFAULT_LEVEL
- See Also:
- Constant Field Values
-
EMPTY_CONTEXT
static final String[] EMPTY_CONTEXT
-
-
Method Detail
-
getKey
String getKey(int position)
Returns a key by its position- Parameters:
position- position in a key array, 0-based- Returns:
- the key or
nullif position exceeds the size of the key array
-
getKeys
String[] getKeys()
An array of keywords. Position may be significant.- Returns:
- an array of key words or
EMPTY_CONTEXTif no keys are known
-
getKeyValue
String getKeyValue(String key)
Returns a value assuming that context keys are formed as key-value pairs (possibly after positional keys)- Parameters:
key- key to match- Returns:
- the value after the matching key or
nullif the key is not found
-
getLevel
int getLevel()
- Returns:
- outline level, 1-based
-
-