Class Iterate

  • All Implemented Interfaces:
    JepComponent, PostfixMathCommandI, java.io.Serializable

    public class Iterate
    extends NaryFunction
    implements JepComponent
    Generate a sequence using iteration iterate(first_value, itteration_lambda_function, limit_lamda_function) For example the following generate the even number from 4 to 20. iterate(4, n=>n+2, n=>n<20)
    See Also:
    Serialized Form
    • Constructor Detail

      • Iterate

        public Iterate()
    • Method Detail

      • init

        public void init​(Jep jep)
        Description copied from interface: JepComponent
        Initialize 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:
        init in interface JepComponent
        Parameters:
        jep - the current Jep instance
      • getLightWeightInstance

        public JepComponent getLightWeightInstance()
        Description copied from interface: JepComponent
        Gets a light-weight instance suitable for using in multiple threads.
        Specified by:
        getLightWeightInstance in interface JepComponent
        Returns:
        either an new instance, null or 'this'.
      • eval

        public java.lang.Object eval​(java.lang.Object[] args)
                              throws EvaluationException
        Description copied from class: NaryFunction
        Evaluate the function
        Specified by:
        eval in class NaryFunction
        Parameters:
        args - arguments to the function
        Returns:
        value returned by the function
        Throws:
        EvaluationException - if the calculation cannot be performed