Package com.singularsys.jep

# 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 Summary

  Fields
  Modifier and Type
  Field
  Description
  `protected JepComponent[]`
  `auxComps`
  `protected Evaluator`
  `evaluator`
  `protected FunctionTable`
  `funTab`
  `protected NodeFactory`
  `nodeFac`
  `protected NumberFactory`
  `numFac`
  `protected OperatorTableI`
  `opTab`
  `protected Parser`
  `parser`
  `protected PrintVisitor`
  `pv`
  `protected VariableFactory`
  `varFac`
  `protected VariableTable`
  `varTab`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `ComponentSet()`
  Create a component set with all components `null`.
  `ComponentSet(Jep j)`
  Uses the components from the jep instance
  `ComponentSet(JepComponent[] components)`
  Use the given list of components, any unspecified one will be set to `null`.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `addAuxComponent(JepComponent comp)`
  `void`
  `addComponents(JepComponent[] components)`
  `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.
  `JepComponent[]`
  `getAuxComponents()`
  `JepComponent[]`
  `getAuxComps()`
  `JepComponent[]`
  `getBaseComponents()`
  `JepComponent[]`
  `getComponents()`
  `Evaluator`
  `getEvaluator()`
  `FunctionTable`
  `getFunctionTable()`
  `NodeFactory`
  `getNodeFactory()`
  `NumberFactory`
  `getNumberFactory()`
  `OperatorTableI`
  `getOperatorTable()`
  `Parser`
  `getParser()`
  `PrintVisitor`
  `getPrintVisitor()`
  `VariableFactory`
  `getVariableFactory()`
  `VariableTable`
  `getVariableTable()`
  `void`
  `setAuxComps(JepComponent[] auxComps)`
  `void`
  `setEvaluator(Evaluator evaluator)`
  `void`
  `setFunctionTable(FunctionTable funTab)`
  `void`
  `setNodeFactory(NodeFactory nodeFac)`
  `void`
  `setNumberFactory(NumberFactory numFac)`
  `void`
  `setOperatorTable(OperatorTableI operatorTableI)`
  `void`
  `setParser(Parser parser)`
  `void`
  `setPrintVisitor(PrintVisitor pv)`
  `void`
  `setVariableFactory(VariableFactory varFac)`
  `void`
  `setVariableTable(VariableTable varTab)`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Field Details

  - ### numFac

    protected NumberFactory numFac

  - ### varFac

    protected VariableFactory varFac

  - ### nodeFac

    protected NodeFactory nodeFac

  - ### varTab

    protected VariableTable varTab

  - ### funTab

    protected FunctionTable funTab

  - ### opTab

    protected OperatorTableI opTab

  - ### parser

    protected Parser parser

  - ### evaluator

    protected Evaluator evaluator

  - ### pv

    protected PrintVisitor pv

  - ### auxComps

    protected JepComponent[] auxComps

- ## 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