Class ComponentSet

java.lang.Object
com.singularsys.jep.ComponentSet
Direct Known Subclasses:
BigDecComponents, LightWeightComponentSet, MediumWeightComponentSet, RealComponents, StandardComponents

public class ComponentSet extends Object
Collects all the components which make up the Jep system.
Author:
Richard Morris
  • Field Details

  • Constructor Details

    • ComponentSet

      public ComponentSet()
      Create a component set with all components null.
    • ComponentSet

      public ComponentSet(Jep j)
      Uses the components from the jep instance
      Parameters:
      j - jep instance
    • ComponentSet

      public ComponentSet(JepComponent[] components)
      Use the given list of components, any unspecified one will be set to null.
      Parameters:
      components - Components
      Since:
      3.4.0
  • Method Details

    • addComponents

      public void addComponents(JepComponent[] components)
    • getComponents

      public JepComponent[] getComponents()
    • getBaseComponents

      public JepComponent[] getBaseComponents()
    • getAuxComponents

      public JepComponent[] getAuxComponents()
    • getNumberFactory

      public NumberFactory getNumberFactory()
    • getNodeFactory

      public NodeFactory getNodeFactory()
    • getVariableFactory

      public VariableFactory getVariableFactory()
    • getVariableTable

      public VariableTable getVariableTable()
    • getFunctionTable

      public FunctionTable getFunctionTable()
    • getOperatorTable

      public OperatorTableI getOperatorTable()
    • getParser

      public Parser getParser()
    • getEvaluator

      public Evaluator getEvaluator()
    • getPrintVisitor

      public PrintVisitor getPrintVisitor()
    • setNodeFactory

      public void setNodeFactory(NodeFactory nodeFac)
    • setNumberFactory

      public void setNumberFactory(NumberFactory numFac)
    • setVariableFactory

      public void setVariableFactory(VariableFactory varFac)
    • setFunctionTable

      public void setFunctionTable(FunctionTable funTab)
    • setVariableTable

      public void setVariableTable(VariableTable varTab)
    • setOperatorTable

      public void setOperatorTable(OperatorTableI operatorTableI)
    • setEvaluator

      public void setEvaluator(Evaluator evaluator)
    • setParser

      public void setParser(Parser parser)
    • setPrintVisitor

      public void setPrintVisitor(PrintVisitor pv)
    • addAuxComponent

      public void addAuxComponent(JepComponent comp)
    • getAuxComps

      public JepComponent[] getAuxComps()
    • setAuxComps

      public void setAuxComps(JepComponent[] auxComps)
    • 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 components
      cl - the class of the component to find
      sup - a supplier of the component if not found
      Returns:
      an instance of the component
      Since:
      Jep 4.1