Interface ListProcessor

All Superinterfaces:
JepComponent, Serializable
All Known Implementing Classes:
MatrixListProcessor, PaddingListProcessor, StandardListProcessor, StreamListProcessor, StreamMatrixListProcessor

public interface ListProcessor extends JepComponent
Defines some utility methods use by higher order functions for processing lists of data, where the actual types used by Jep may differ.
  • Method Details

    • fromArgs

      Iterable<Object> fromArgs(Object arg) throws EvaluationException
      Returns an iterable view of the input arguments.
      Parameters:
      arg - typically a list, but can be any type. If the type is not a list, an iterator with a single element is returned.
      Returns:
      an Iterable view of the argument
      Throws:
      EvaluationException - on error
    • makeList

      List<Object> makeList()
      Get an empty list which elements can be added.
      Returns:
      an empty list
    • fromList

      Object fromList(List<Object> list) throws EvaluationException
      Convert a list produced by makeList() to the type used by Jep environment. Some implementations just return the input.
      Parameters:
      list - a list
      Returns:
      a type suitable for use by Jep.
      Throws:
      EvaluationException - on error
    • fromCollection

      Object fromCollection(Collection<Object> c) throws EvaluationException
      Convert a general collection into a type used the Jep environment.
      Parameters:
      c - input collection
      Returns:
      a type suitable for use by Jep
      Throws:
      EvaluationException - on error