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 class
ListEvaluator.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 int
LIST_BASE_VALUE
static String
LIST_COPY
static int
LIST_COPY_TYPE
static String
LIST_COPY2
static String
LIST_FQ
static String
LIST_INSERT_AT
static int
LIST_INSERT_AT_TYPE
static String
LIST_INSERT_AT2
static String
LIST_NAMESPACE
static String
LIST_REVERSE
static int
LIST_REVERSE_TYPE
static String
LIST_REVERSE2
static String
LIST_SORT
static int
LIST_SORT_TYPE
static String
LIST_STARTS_WITH
static int
LIST_STARTS_WITH_TYPE
static String
LIST_STARTS_WITH2
static String
LIST_SUBSET
static int
LIST_SUBSET_TYPE
static String
PICK
static int
PICK_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 Object
checkCopyNode(ExpressionInterface expr, State state, boolean doInsert)
boolean
dispatch(Polyad polyad, State state)
Does the actual evaluation of thePolyad
.protected void
doListCopyOrInsert(Polyad polyad, State state, boolean doInsert)
protected void
doListReverse(Polyad polyad, State state)
protected void
doListSort(Polyad polyad, State state)
Always returns a sorted list.protected void
doListStartsWith(Polyad polyad, State state)
Returns a list of indices.protected boolean
doListSubset(Polyad polyad, State state)
protected boolean
doPickSubset(Polyad polyad, State state)
Pick elements based on a function that is supplied.String[]
getFunctionNames()
String
getNamespace()
int
getType(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, 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:
getFunctionNames
in classAbstractEvaluator
-
dispatch
public boolean dispatch(Polyad polyad, State state)
Description copied from class:AbstractEvaluator
Does the actual evaluation of thePolyad
.- Specified by:
dispatch
in 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
-
-
-