Package com.singularsys.jep.functions

# Class Count

java.lang.Object
com.singularsys.jep.functions.PostfixMathCommand
com.singularsys.jep.functions.UnaryFunction
com.singularsys.jep.functions.Count

All Implemented Interfaces:
  `JepComponent`, `PostfixMathCommandI`, `Serializable`

public class Count extends UnaryFunction implements JepComponent
Count the number of elements in a list.

Since:
  Jep 4.1
See Also:
  - Serialized Form

- ## Nested Class Summary

  ## Nested classes/interfaces inherited from class com.singularsys.jep.functions.UnaryFunction

  `UnaryFunction.FunctionWithException<T>`

- ## Field Summary

  ### Fields inherited from class com.singularsys.jep.functions.PostfixMathCommand

  `curNumberOfParameters, description, name, NaN, numberOfParameters`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `Count()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `Object`
  `count(Object param1)`
  `Object`
  `eval(Object l)`
  Evaluate the function
  `JepComponent`
  `getLightWeightInstance()`
  Gets a light-weight instance suitable for using in multiple threads.
  `void`
  `init(Jep jep)`
  Initialize the component.

  ### Methods inherited from class com.singularsys.jep.functions.UnaryFunction

  `instanceOf, instanceOf, instanceOf, instanceOf, run`

  ### Methods inherited from class com.singularsys.jep.functions.PostfixMathCommand

  `asArray, asBool, asDouble, asInt, asLong, asStrictInt, asString, asType, checkNumberOfParameters, getDescription, getDescription, getDescriptionWithType, getName, getNumberOfParameters, setCurNumberOfParameters, setDescription, setName, toString, toString`

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

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

- ## Constructor Details

  - ### Count

    public Count()

- ## Method Details

  - ### eval

    public Object eval(Object l) throws EvaluationException
    Description copied from class: `UnaryFunction`
    Evaluate the function
    Specified by:
      `eval` in class `UnaryFunction`
    Parameters:
      `l` - the single argument passed in
    Returns:
      the result of the function
    Throws:
      `EvaluationException` - on error

  - ### count

    public Object count(Object param1) throws EvaluationException
    Throws:
      `EvaluationException`

  - ### init

    public void init(Jep jep)
    Description copied from interface: `JepComponent`
    Initialize the component. This method 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 a new instance, null or 'this'.