Package org.qdl_lang.state
Class XTable<K extends XKey,V extends XThing>
- java.lang.Object
-
- java.util.AbstractMap<K,V>
-
- java.util.HashMap<K,V>
-
- org.qdl_lang.state.XTable<K,V>
-
- All Implemented Interfaces:
Serializable
,Cloneable
,Map<K,V>
public abstract class XTable<K extends XKey,V extends XThing> extends HashMap<K,V> implements Cloneable, Serializable
A symbol table. This should hold functions modules and (eventually) variables. Sequences of these are managed byXStack
.Created by Jeff Gaynor
on 11/7/21 at 5:14 AM- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K extends Object,V extends Object>, AbstractMap.SimpleImmutableEntry<K extends Object,V extends Object>
-
-
Field Summary
Fields Modifier and Type Field Description protected boolean
FDOC_CONVERT
-
Constructor Summary
Constructors Constructor Description XTable()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected String
convertFDOC(String x)
abstract V
deserializeElement(XMLEventReader xer, SerializationState SerializationState, QDLInterpreter qi)
Deprecated.abstract void
deserializeFromJSON(net.sf.json.JSONObject json, QDLInterpreter qi, SerializationState serializationState)
abstract String
fromJSONEntry(String x, SerializationState serializationState)
abstract void
fromXML(XMLEventReader xer, QDLInterpreter qi)
Deprecated.void
fromXML(XMLEventReader xer, SerializationState SerializationState)
Version 2.0 serializationUUID
getID()
ModuleUtils
getModuleUtils()
abstract String
getXMLElementTag()
Deprecated.abstract String
getXMLTableTag()
Deprecated.V
put(XThing value)
Should add theXThing
based on itsXThing.getName()
as the key.net.sf.json.JSONArray
serializeToJSON(SerializationState serializationState)
abstract net.sf.json.JSONObject
serializeToJSON(V xThing, SerializationState serializationState)
abstract String
toJSONEntry(V xThing, SerializationState serializationState)
String
toString()
abstract void
toXML(XMLStreamWriter xsw, SerializationState SerializationState)
Deprecated.-
Methods inherited from class java.util.HashMap
clear, clone, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, forEach, get, getOrDefault, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values
-
Methods inherited from class java.util.AbstractMap
equals, hashCode
-
-
-
-
Method Detail
-
put
public V put(XThing value)
Should add theXThing
based on itsXThing.getName()
as the key.- Parameters:
value
-- Returns:
-
toXML
public abstract void toXML(XMLStreamWriter xsw, SerializationState SerializationState) throws XMLStreamException
Deprecated.- Parameters:
xsw
-SerializationState
-- Throws:
XMLStreamException
-
toJSONEntry
public abstract String toJSONEntry(V xThing, SerializationState serializationState) throws Throwable
- Throws:
Throwable
-
fromJSONEntry
public abstract String fromJSONEntry(String x, SerializationState serializationState)
-
fromXML
public abstract void fromXML(XMLEventReader xer, QDLInterpreter qi) throws XMLStreamException
Deprecated.- Parameters:
xer
-qi
-- Throws:
XMLStreamException
-
fromXML
public void fromXML(XMLEventReader xer, SerializationState SerializationState) throws XMLStreamException
Version 2.0 serialization- Parameters:
xer
-SerializationState
-- Throws:
XMLStreamException
-
getXMLTableTag
public abstract String getXMLTableTag()
Deprecated.- Returns:
-
getXMLElementTag
public abstract String getXMLElementTag()
Deprecated.- Returns:
-
deserializeElement
public abstract V deserializeElement(XMLEventReader xer, SerializationState SerializationState, QDLInterpreter qi) throws XMLStreamException
Deprecated.- Parameters:
xer
-SerializationState
-qi
-- Returns:
- Throws:
XMLStreamException
-
getID
public UUID getID()
-
toString
public String toString()
-
serializeToJSON
public net.sf.json.JSONArray serializeToJSON(SerializationState serializationState) throws Throwable
- Throws:
Throwable
-
getModuleUtils
public ModuleUtils getModuleUtils()
-
serializeToJSON
public abstract net.sf.json.JSONObject serializeToJSON(V xThing, SerializationState serializationState) throws Throwable
- Throws:
Throwable
-
deserializeFromJSON
public abstract void deserializeFromJSON(net.sf.json.JSONObject json, QDLInterpreter qi, SerializationState serializationState) throws Throwable
- Throws:
Throwable
-
-