Class ExpressionInputImpl<T>

    • Constructor Summary

      Constructors 
      Constructor Description
      ExpressionInputImpl​(java.lang.String exprStr, T initial, java.lang.Class<T> type, de.odysseus.el.util.SimpleContext ctx)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      T call()
      Perform the expression evaluation
      void close()  
      java.lang.String expr()  
      T get()
      Get a value.
      int get​(java.util.List<T> buffer, int limit)
      Bulk values get.
      T last()  
      void reset()
      Set the last value to the initial one.
      long skip​(long count)
      Skip some items.
      java.lang.String toString()  
      java.lang.Class<T> type()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • ExpressionInputImpl

        public ExpressionInputImpl​(java.lang.String exprStr,
                                   T initial,
                                   java.lang.Class<T> type,
                                   de.odysseus.el.util.SimpleContext ctx)
    • Method Detail

      • call

        public final T call()
                     throws javax.el.PropertyNotFoundException,
                            javax.el.ELException
        Description copied from interface: ExpressionInput
        Perform the expression evaluation
        Specified by:
        call in interface java.util.concurrent.Callable<T>
        Specified by:
        call in interface ExpressionInput<T>
        Returns:
        the expression evaluation result
        Throws:
        javax.el.PropertyNotFoundException
        javax.el.ELException
      • last

        public final T last()
        Specified by:
        last in interface ExpressionInput<T>
        Returns:
        the result of the last expression evaluation
      • get

        public T get()
              throws javax.el.PropertyNotFoundException,
                     javax.el.ELException
        Description copied from interface: ExpressionInput
        Get a value. A user should invoke call() method by itself to evaluate the expression if the given expression input is not synchronous. The initial value only would be returned otherwise.
        Specified by:
        get in interface ExpressionInput<T>
        Specified by:
        get in interface Input<T>
        Specified by:
        get in interface java.util.function.Supplier<T>
        Returns:
        next item or null if no items available more
        Throws:
        javax.el.PropertyNotFoundException
        javax.el.ELException
      • get

        public int get​(java.util.List<T> buffer,
                       int limit)
                throws javax.el.PropertyNotFoundException,
                       javax.el.ELException
        Description copied from interface: ExpressionInput
        Bulk values get. A user should invoke call() method by itself to evaluate the expression if the given expression input is not synchronous. The initial value only would be returned otherwise.
        Specified by:
        get in interface ExpressionInput<T>
        Specified by:
        get in interface Input<T>
        Parameters:
        buffer - buffer for the values
        limit - max count of the values to put into the buffer
        Returns:
        count of the items have been get and put into the buffer actually
        Throws:
        javax.el.PropertyNotFoundException
        javax.el.ELException
      • skip

        public long skip​(long count)
        Description copied from interface: ExpressionInput
        Skip some items.
        Specified by:
        skip in interface ExpressionInput<T>
        Specified by:
        skip in interface Input<T>
        Parameters:
        count - count of items should be skipped from the input stream
      • expr

        public final java.lang.String expr()
        Specified by:
        expr in interface ExpressionInput<T>
        Returns:
        the expression string
      • type

        public final java.lang.Class<T> type()
        Specified by:
        type in interface ExpressionInput<T>
        Returns:
        the result type
      • toString

        public final java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • close

        public final void close()
        Specified by:
        close in interface java.lang.AutoCloseable