Package org.qdl_lang.functions
Class FStack<V extends FTable<? extends FKey,? extends FunctionRecord>>
- java.lang.Object
-
- org.qdl_lang.state.XStack<V>
-
- org.qdl_lang.functions.FStack<V>
-
- All Implemented Interfaces:
Serializable,Documentable
public class FStack<V extends FTable<? extends FKey,? extends FunctionRecord>> extends XStack<V> implements Serializable, Documentable
Created by Jeff Gaynor
on 3/15/21 at 6:22 AM- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description FStack()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidfromXML(XMLEventReader xer, QDLInterpreter qi)List<FunctionRecordInterface>getByAllName(String name)Returns all of the named functions for any arg count.List<String>getDocumentation(String fName, int argCount)Get the complete documentation for a specific function.List<String>getDocumentation(FKey key)FunctionRecordgetFunctionReference(String name)XStackgetStateStack(State state)This gets the stack corresponding to this class from the state..StringgetXMLStackTag()StringgetXMLTableTag()List<String>listAllDocs()Return the first lines of all the function documentation this module knows.List<String>listAllDocs(String functionName)Return the first line of all documentation for the given function name.Set<DyadicFunctionReferenceNode>listFunctionReferences(String regex)TreeSet<String>listFunctions(String regex)List first lines of function documentation given a regular expression.XStacknewInstance()XTablenewTableInstance()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, fromXMLNEW, get, getAll, getJSON, getLocal, getRoot, getStack, isEmpty, keySet, localGet, localHas, localPut, localRemove, main, nonlocalGet, peek, push, pushNewTable, put, put, remove, serializeContent, serializeToJSON, setStack, size, toJSON, toString, toString, toXML, toXMLNEW
-
-
-
-
Method Detail
-
getFunctionReference
public FunctionRecord getFunctionReference(String name)
-
getByAllName
public List<FunctionRecordInterface> getByAllName(String name)
Returns all of the named functions for any arg count. This is needed to populate copies of local state.- Parameters:
name-- Returns:
-
getXMLStackTag
public String getXMLStackTag()
- Specified by:
getXMLStackTagin classXStack<V extends FTable<? extends FKey,? extends FunctionRecord>>
-
getXMLTableTag
public String getXMLTableTag()
- Specified by:
getXMLTableTagin classXStack<V extends FTable<? extends FKey,? extends FunctionRecord>>- Returns:
-
fromXML
public void fromXML(XMLEventReader xer, QDLInterpreter qi) throws XMLStreamException
- Specified by:
fromXMLin classXStack<V extends FTable<? extends FKey,? extends FunctionRecord>>- Throws:
XMLStreamException
-
listFunctions
public TreeSet<String> listFunctions(String regex)
Description copied from interface:DocumentableList first lines of function documentation given a regular expression. If the regular expression is null, then no filtering is done.- Specified by:
listFunctionsin interfaceDocumentable- Returns:
-
listFunctionReferences
public Set<DyadicFunctionReferenceNode> listFunctionReferences(String regex)
-
listAllDocs
public List<String> listAllDocs()
Description copied from interface:DocumentableReturn the first lines of all the function documentation this module knows.- Specified by:
listAllDocsin interfaceDocumentable- Returns:
-
listAllDocs
public List<String> listAllDocs(String functionName)
Description copied from interface:DocumentableReturn the first line of all documentation for the given function name.- Specified by:
listAllDocsin interfaceDocumentable- Returns:
-
getDocumentation
public List<String> getDocumentation(String fName, int argCount)
Description copied from interface:DocumentableGet the complete documentation for a specific function.- Specified by:
getDocumentationin interfaceDocumentable- Returns:
-
getDocumentation
public List<String> getDocumentation(FKey key)
- Specified by:
getDocumentationin interfaceDocumentable
-
newInstance
public XStack newInstance()
- Specified by:
newInstancein classXStack<V extends FTable<? extends FKey,? extends FunctionRecord>>
-
newTableInstance
public XTable newTableInstance()
- Specified by:
newTableInstancein classXStack<V extends FTable<? extends FKey,? extends FunctionRecord>>
-
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- Specified by:
setStateStackin classXStack<V extends FTable<? extends FKey,? extends FunctionRecord>>
-
getStateStack
public XStack getStateStack(State state)
Description copied from class:XStackThis gets the stack corresponding to this class from the state..- Specified by:
getStateStackin classXStack<V extends FTable<? extends FKey,? extends FunctionRecord>>- Returns:
-
-