Package com.singularsys.jep
Class ComponentSet
java.lang.Object
com.singularsys.jep.ComponentSet
- Direct Known Subclasses:
BigDecComponents,LightWeightComponentSet,MediumWeightComponentSet,RealComponents,StandardComponents
Collects all the components which make up the Jep system.
- Author:
- Richard Morris
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected JepComponent[]protected Evaluatorprotected FunctionTableprotected NodeFactoryprotected NumberFactoryprotected OperatorTableIprotected Parserprotected PrintVisitorprotected VariableFactoryprotected VariableTable -
Constructor Summary
ConstructorsConstructorDescriptionCreate a component set with all componentsnull.ComponentSet(Jep j) Uses the components from the jep instanceComponentSet(JepComponent[] components) Use the given list of components, any unspecified one will be set tonull. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddAuxComponent(JepComponent comp) voidaddComponents(JepComponent[] components) protected static <T extends JepComponent>
TfindOrElse(JepComponent[] replacements, Class<T> cl, Supplier<T> sup) Find a component of a given class in the replacements array, if not found create a new instance using the supplier.voidsetAuxComps(JepComponent[] auxComps) voidsetEvaluator(Evaluator evaluator) voidsetFunctionTable(FunctionTable funTab) voidsetNodeFactory(NodeFactory nodeFac) voidsetNumberFactory(NumberFactory numFac) voidsetOperatorTable(OperatorTableI operatorTableI) voidvoidvoidsetVariableFactory(VariableFactory varFac) voidsetVariableTable(VariableTable varTab)
-
Field Details
-
numFac
-
varFac
-
nodeFac
-
varTab
-
funTab
-
opTab
-
parser
-
evaluator
-
pv
-
auxComps
-
-
Constructor Details
-
ComponentSet
public ComponentSet()Create a component set with all componentsnull. -
ComponentSet
Uses the components from the jep instance- Parameters:
j- jep instance
-
ComponentSet
Use the given list of components, any unspecified one will be set tonull.- Parameters:
components- Components- Since:
- 3.4.0
-
-
Method Details
-
addComponents
-
getComponents
-
getBaseComponents
-
getAuxComponents
-
getNumberFactory
-
getNodeFactory
-
getVariableFactory
-
getVariableTable
-
getFunctionTable
-
getOperatorTable
-
getParser
-
getEvaluator
-
getPrintVisitor
-
setNodeFactory
-
setNumberFactory
-
setVariableFactory
-
setFunctionTable
-
setVariableTable
-
setOperatorTable
-
setEvaluator
-
setParser
-
setPrintVisitor
-
addAuxComponent
-
getAuxComps
-
setAuxComps
-
findOrElse
protected static <T extends JepComponent> T findOrElse(JepComponent[] replacements, Class<T> cl, Supplier<T> sup) Find a component of a given class in the replacements array, if not found create a new instance using the supplier.- Type Parameters:
T- The type of JepComponent- Parameters:
replacements- array of componentscl- the class of the component to findsup- a supplier of the component if not found- Returns:
- an instance of the component
- Since:
- Jep 4.1
-