Package org.qdl_lang.evaluate
Class ListEvaluator
- java.lang.Object
-
- org.qdl_lang.evaluate.AbstractEvaluator
-
- org.qdl_lang.evaluate.ListEvaluator
-
- All Implemented Interfaces:
Serializable,EvaluatorInterface
public class ListEvaluator extends AbstractEvaluator
Created by Jeff Gaynor
on 9/30/21 at 5:07 PM- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected classListEvaluator.DoReverse-
Nested classes/interfaces inherited from class org.qdl_lang.evaluate.AbstractEvaluator
AbstractEvaluator.CommonKeyIterator, AbstractEvaluator.fPointer, AbstractEvaluator.fpResult
-
-
Field Summary
Fields Modifier and Type Field Description static intLIST_BASE_VALUEstatic StringLIST_COPYstatic intLIST_COPY_TYPEstatic StringLIST_COPY2static StringLIST_FQstatic StringLIST_INSERT_ATstatic intLIST_INSERT_AT_TYPEstatic StringLIST_INSERT_AT2static StringLIST_NAMESPACEstatic StringLIST_REVERSEstatic intLIST_REVERSE_TYPEstatic StringLIST_REVERSE2static StringLIST_SORTstatic intLIST_SORT_TYPEstatic StringLIST_STARTS_WITHstatic intLIST_STARTS_WITH_TYPEstatic StringLIST_STARTS_WITH2static StringLIST_SUBSETstatic intLIST_SUBSET_TYPEstatic StringPICKstatic intPICK_TYPE-
Fields inherited from class org.qdl_lang.evaluate.AbstractEvaluator
bigArgList, bigArgList0, FILE_OP_AUTO, FILE_OP_BINARY, FILE_OP_INPUT_STREAM, FILE_OP_TEXT_INI, FILE_OP_TEXT_STEM, FILE_OP_TEXT_STRING, FILE_OP_TEXT_WITHOUT_LIST_INI, fNames, MAX_ARG_COUNT
-
Fields inherited from interface org.qdl_lang.evaluate.EvaluatorInterface
UNKNOWN_VALUE
-
-
Constructor Summary
Constructors Constructor Description ListEvaluator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected ObjectcheckCopyNode(ExpressionInterface expr, State state, boolean doInsert)booleandispatch(Polyad polyad, State state)Does the actual evaluation of thePolyad.protected voiddoListCopyOrInsert(Polyad polyad, State state, boolean doInsert)protected voiddoListReverse(Polyad polyad, State state)protected voiddoListSort(Polyad polyad, State state)Always returns a sorted list.protected voiddoListStartsWith(Polyad polyad, State state)Returns a list of indices.protected booleandoListSubset(Polyad polyad, State state)protected booleandoPickSubset(Polyad polyad, State state)Pick elements based on a function that is supplied.String[]getFunctionNames()StringgetNamespace()intgetType(String name)-
Methods inherited from class org.qdl_lang.evaluate.AbstractEvaluator
areAllBigDecimals, areAllBoolean, areAllLongs, areAllNumbers, areAllSets, areAllStems, areAllStrings, areAnyBigDecimals, areNoneStems, bdEquals, checkNull, checkNull, convertArgsToStem, evaluate, evaluate, finishExpr, getBigArgList, getBigArgList0, getCommonKeys, getFQFunctionNames, getFunctionReferenceNode, getFunctionReferenceNode, getOperator, getOrCreateStem, isBigDecimal, isBoolean, isBuiltInFunction, isFunctionRef, isLong, isNumber, isScalar, isSet, isStem, isStemList, isString, listFunctions, NEWgetOperator, OLDgetOperator, process1, process2, process2, process3, processSet1, processSet2, processSet2, processStem1, processStem2, processStem3, resolveResourceToFile, tempFname, toBD, toConstants, toStem
-
-
-
-
Field Detail
-
LIST_NAMESPACE
public static final String LIST_NAMESPACE
- See Also:
- Constant Field Values
-
LIST_FQ
public static final String LIST_FQ
- See Also:
- Constant Field Values
-
LIST_BASE_VALUE
public static final int LIST_BASE_VALUE
- See Also:
- Constant Field Values
-
LIST_INSERT_AT
public static final String LIST_INSERT_AT
- See Also:
- Constant Field Values
-
LIST_INSERT_AT2
public static final String LIST_INSERT_AT2
- See Also:
- Constant Field Values
-
LIST_INSERT_AT_TYPE
public static final int LIST_INSERT_AT_TYPE
- See Also:
- Constant Field Values
-
LIST_SUBSET
public static final String LIST_SUBSET
- See Also:
- Constant Field Values
-
LIST_SUBSET_TYPE
public static final int LIST_SUBSET_TYPE
- See Also:
- Constant Field Values
-
LIST_COPY
public static final String LIST_COPY
- See Also:
- Constant Field Values
-
LIST_COPY2
public static final String LIST_COPY2
- See Also:
- Constant Field Values
-
LIST_COPY_TYPE
public static final int LIST_COPY_TYPE
- See Also:
- Constant Field Values
-
LIST_STARTS_WITH
public static final String LIST_STARTS_WITH
- See Also:
- Constant Field Values
-
LIST_STARTS_WITH2
public static final String LIST_STARTS_WITH2
- See Also:
- Constant Field Values
-
LIST_STARTS_WITH_TYPE
public static final int LIST_STARTS_WITH_TYPE
- See Also:
- Constant Field Values
-
LIST_REVERSE
public static final String LIST_REVERSE
- See Also:
- Constant Field Values
-
LIST_REVERSE2
public static final String LIST_REVERSE2
- See Also:
- Constant Field Values
-
LIST_REVERSE_TYPE
public static final int LIST_REVERSE_TYPE
- See Also:
- Constant Field Values
-
LIST_SORT
public static final String LIST_SORT
- See Also:
- Constant Field Values
-
LIST_SORT_TYPE
public static final int LIST_SORT_TYPE
- See Also:
- Constant Field Values
-
PICK
public static final String PICK
- See Also:
- Constant Field Values
-
PICK_TYPE
public static final int PICK_TYPE
- See Also:
- Constant Field Values
-
-
Method Detail
-
getFunctionNames
public String[] getFunctionNames()
- Specified by:
getFunctionNamesin classAbstractEvaluator
-
dispatch
public boolean dispatch(Polyad polyad, State state)
Description copied from class:AbstractEvaluatorDoes the actual evaluation of thePolyad.- Specified by:
dispatchin classAbstractEvaluator- Returns:
-
getType
public int getType(String name)
-
getNamespace
public String getNamespace()
-
doListSort
protected void doListSort(Polyad polyad, State state)
Always returns a sorted list.- Parameters:
polyad-state-
-
checkCopyNode
protected Object checkCopyNode(ExpressionInterface expr, State state, boolean doInsert)
-
doPickSubset
protected boolean doPickSubset(Polyad polyad, State state)
Pick elements based on a function that is supplied.- Parameters:
polyad-state-- Returns:
-
doListStartsWith
protected void doListStartsWith(Polyad polyad, State state)
Returns a list of indices. The results is conformable to the left argument and the values in it are the indices of the right argument.- Parameters:
polyad-state-
-
-