public class ConstantInt extends ConstantExpression
| Modifier and Type | Field and Description |
|---|---|
static ConstantInt |
MINUS_ONE
Represents -1.
|
static ConstantInt |
ONE
Represents 1.
|
static ConstantInt |
ZERO
Represents 0.
|
| Constructor and Description |
|---|
ConstantInt(int value)
Creates a new instance for the given number.
|
| Modifier and Type | Method and Description |
|---|---|
Object |
eval(LocalRenderContext ctx)
Evaluates the expression into an object using the given context.
|
Class<?> |
getType()
Returns the Java class of the objects yielded by this expression.
|
String |
toString() |
copy, isConstant, propagateVisitor, reducepublic static final ConstantInt ZERO
public static final ConstantInt ONE
public static final ConstantInt MINUS_ONE
public ConstantInt(int value)
value - the number to representpublic Object eval(LocalRenderContext ctx)
Expressionctx - the current rendering contextpublic Class<?> getType()
ExpressionCopyright © 2018. All rights reserved.