Module com.github.akurilov.commons
Interface ExpressionInput<T>
-
- Type Parameters:
T-
- All Superinterfaces:
java.lang.AutoCloseable,java.util.concurrent.Callable<T>,Input<T>,java.util.function.Supplier<T>
- All Known Subinterfaces:
SynchronousExpressionInput<T>
public interface ExpressionInput<T> extends java.util.concurrent.Callable<T>, Input<T>
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceExpressionInput.Builder<T>
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringASYNC_MARKERstatic javax.el.ExpressionFactoryFACTORYstatic java.lang.StringSELF_REF_IDstatic java.lang.StringSYNC_MARKER
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description static <T> ExpressionInput.Builder<T>builder()Tcall()Perform the expression evaluationjava.lang.Stringexpr()Tget()Get a value.intget(java.util.List<T> buffer, int limit)Bulk values get.Tlast()voidreset()Set the last value to the initial one.longskip(long count)Skip some items.java.lang.Class<T>type()
-
-
-
Field Detail
-
SELF_REF_ID
static final java.lang.String SELF_REF_ID
- See Also:
- Constant Field Values
-
ASYNC_MARKER
static final java.lang.String ASYNC_MARKER
- See Also:
- Constant Field Values
-
SYNC_MARKER
static final java.lang.String SYNC_MARKER
- See Also:
- Constant Field Values
-
FACTORY
static final javax.el.ExpressionFactory FACTORY
-
-
Method Detail
-
call
T call()
Perform the expression evaluation- Specified by:
callin interfacejava.util.concurrent.Callable<T>- Returns:
- the expression evaluation result
-
last
T last()
- Returns:
- the result of the last expression evaluation
-
get
T get() throws javax.el.PropertyNotFoundException, javax.el.ELException
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.
-
get
int get(java.util.List<T> buffer, int limit) throws javax.el.PropertyNotFoundException, javax.el.ELException
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.
-
skip
long skip(long count)
Skip some items.
-
expr
java.lang.String expr()
- Returns:
- the expression string
-
type
java.lang.Class<T> type()
- Returns:
- the result type
-
builder
static <T> ExpressionInput.Builder<T> builder()
-
-