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>
- All Known Implementing Classes:
ExpressionInputImpl,SynchronousExpressionInputImpl
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
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringASYNC_MARKERstatic java.util.regex.PatternEXPRESSION_PATTERNstatic javax.el.ExpressionFactoryFACTORYstatic java.lang.StringINIT_MARKERstatic 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 ExpressionInput.Builderbuilder()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.
-
-
-
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
-
INIT_MARKER
static final java.lang.String INIT_MARKER
- See Also:
- Constant Field Values
-
EXPRESSION_PATTERN
static final java.util.regex.Pattern EXPRESSION_PATTERN
-
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
-
builder
static ExpressionInput.Builder builder()
-
-