Package org.qdl_lang.variables
Class VStack<V extends VTable<? extends XKey,? extends VThing>>
- java.lang.Object
-
- org.qdl_lang.state.XStack<V>
-
- org.qdl_lang.variables.VStack<V>
-
- All Implemented Interfaces:
Serializable
public class VStack<V extends VTable<? extends XKey,? extends VThing>> extends XStack<V>
Created by Jeff Gaynor
on 2/20/22 at 6:14 AM- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static StringVSTACK_SERIALIZATION_2_1_TABLES_TAGstatic StringVSTACK_SERIALIZATION_VERSION_2_1static StringVSTACK_VERSION_TAG
-
Constructor Summary
Constructors Constructor Description VStack()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidfromXML(XMLEventReader xer, QDLInterpreter qi)protected voidfromXMLNEW(XMLEventReader xer, SerializationState serializationState)XStackgetStateStack(State state)This gets the stack corresponding to this class from the state..StringgetXMLStackTag()StringgetXMLTableTag()TreeSet<String>listVariables()XStacknewInstance()XTablenewTableInstance()net.sf.json.JSONObjectserializeToJSON(SerializationState serializationState)voidsetStateStack(State state, XStack xStack)This sets the stack corresponding to this class from the state with the given stack.-
Methods inherited from class org.qdl_lang.state.XStack
addTables, allKeys, append, appendTables, clear, clone, containsKey, containsKey, deserializeFromJSON, deserializeFromJSONNEW, deserializeFromJSONOLD, fromJSON, fromXML, get, getAll, getJSON, getLocal, getRoot, getStack, isEmpty, keySet, localGet, localHas, localPut, localRemove, main, nonlocalGet, peek, push, pushNewTable, put, put, remove, serializeContent, setStack, size, toJSON, toString, toString, toXML, toXMLNEW
-
-
-
-
Field Detail
-
VSTACK_SERIALIZATION_VERSION_2_1
public static final String VSTACK_SERIALIZATION_VERSION_2_1
- See Also:
- Constant Field Values
-
VSTACK_SERIALIZATION_2_1_TABLES_TAG
public static final String VSTACK_SERIALIZATION_2_1_TABLES_TAG
- See Also:
- Constant Field Values
-
VSTACK_VERSION_TAG
public static final String VSTACK_VERSION_TAG
- See Also:
- Constant Field Values
-
-
Method Detail
-
newInstance
public XStack newInstance()
-
newTableInstance
public XTable newTableInstance()
-
fromXML
public void fromXML(XMLEventReader xer, QDLInterpreter qi) throws XMLStreamException
-
getXMLStackTag
public String getXMLStackTag()
-
getXMLTableTag
public String getXMLTableTag()
-
setStateStack
public void setStateStack(State state, XStack xStack)
Description copied from class:XStackThis sets the stack corresponding to this class from the state with the given stack. If the stack is not of the correct type, a class cast exception will result.
We could have tried this with some type of dynamic casting, but that is messy and fragile in Java
-
getStateStack
public XStack getStateStack(State state)
Description copied from class:XStackThis gets the stack corresponding to this class from the state..
-
fromXMLNEW
protected void fromXMLNEW(XMLEventReader xer, SerializationState serializationState) throws XMLStreamException
- Overrides:
fromXMLNEWin classXStack<V extends VTable<? extends XKey,? extends VThing>>- Throws:
XMLStreamException
-
serializeToJSON
public net.sf.json.JSONObject serializeToJSON(SerializationState serializationState) throws Throwable
-
-