Class MatrixListProcessor
- java.lang.Object
-
- com.singularsys.extensions.lambda.StandardListProcessor
-
- com.singularsys.extensions.lambda.FieldListProcessor
-
- com.singularsys.extensions.lambda.MatrixListProcessor
-
- All Implemented Interfaces:
ListProcessor,JepComponent,java.io.Serializable
public class MatrixListProcessor extends FieldListProcessor
A list processor which accepts and producesVectorIarguments.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description classMatrixListProcessor.MatrixIterableAn Iterable backed by aMatrixI.classMatrixListProcessor.MatrixIteratorAn Iterator over aMatrixIclassMatrixListProcessor.VectorIterableAn Iterable backed by aVectorI.classMatrixListProcessor.VectorIteratorAn Iterator over aVectorI
-
Field Summary
-
Fields inherited from class com.singularsys.extensions.lambda.StandardListProcessor
sortFun
-
-
Constructor Summary
Constructors Constructor Description MatrixListProcessor(MatrixFactoryI mf, FieldI field)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Iterable<java.lang.Object>fromArgs(java.lang.Object arg)Returns an Iterable over the input arguments.java.lang.ObjectfromCollection(java.util.Collection<java.lang.Object> tree)Convert a general collection into a type used the the Jep environment.java.lang.ObjectfromList(java.util.List<java.lang.Object> list)Convert a list produced byListProcessor.getList()to the type used by Jep environment.JepComponentgetLightWeightInstance()Gets a light-weight instance suitable for using in multiple threads.java.util.List<java.lang.Object>getList()Get an empty list which elements can be added.voidinit(Jep jep)Initialize the component.-
Methods inherited from class com.singularsys.extensions.lambda.FieldListProcessor
compareResult
-
-
-
-
Constructor Detail
-
MatrixListProcessor
public MatrixListProcessor(MatrixFactoryI mf, FieldI field)
-
-
Method Detail
-
init
public void init(Jep jep)
Description copied from interface:JepComponentInitialize the component. This methods is called whenever a component is added to Jep. Hence it allows components to keep track of the other components they may rely on.- Specified by:
initin interfaceJepComponent- Overrides:
initin classStandardListProcessor- Parameters:
jep- the current Jep instance
-
getLightWeightInstance
public JepComponent getLightWeightInstance()
Description copied from interface:JepComponentGets a light-weight instance suitable for using in multiple threads.- Specified by:
getLightWeightInstancein interfaceJepComponent- Overrides:
getLightWeightInstancein classStandardListProcessor- Returns:
- either an new instance, null or 'this'.
-
fromArgs
public java.lang.Iterable<java.lang.Object> fromArgs(java.lang.Object arg) throws EvaluationExceptionReturns an Iterable over the input arguments.- Specified by:
fromArgsin interfaceListProcessor- Overrides:
fromArgsin classStandardListProcessor- Parameters:
arg- an input to the function. Expects an argument of typeVectorIorMatrixI.- Returns:
- a
MatrixListProcessor.VectorIterableorMatrixListProcessor.MatrixIterable - Throws:
EvaluationException- if argument is not of type VectorI or MatrixI
-
getList
public java.util.List<java.lang.Object> getList()
Description copied from interface:ListProcessorGet an empty list which elements can be added.- Specified by:
getListin interfaceListProcessor- Overrides:
getListin classStandardListProcessor- Returns:
- an empty list
-
fromList
public java.lang.Object fromList(java.util.List<java.lang.Object> list) throws EvaluationExceptionDescription copied from interface:ListProcessorConvert a list produced byListProcessor.getList()to the type used by Jep environment. Some implementations just return the input.- Specified by:
fromListin interfaceListProcessor- Overrides:
fromListin classStandardListProcessor- Parameters:
list- a list- Returns:
- a type suitable for use by Jep.
- Throws:
EvaluationException- on error
-
fromCollection
public java.lang.Object fromCollection(java.util.Collection<java.lang.Object> tree) throws EvaluationExceptionDescription copied from interface:ListProcessorConvert a general collection into a type used the the Jep environment.- Specified by:
fromCollectionin interfaceListProcessor- Overrides:
fromCollectionin classStandardListProcessor- Parameters:
tree- input collection- Returns:
- a type suitable for use by Jep
- Throws:
EvaluationException- on error
-
-