@Immutable public final class ConstantImpl<T> extends ExpressionBase<T> implements Constant<T>
Constructor and Description |
---|
ConstantImpl(Class<T> type,
T constant)
Create a new Constant of the given type for the given object
|
ConstantImpl(T constant)
Create a new Constant for the given object
|
Modifier and Type | Method and Description |
---|---|
<R,C> R |
accept(Visitor<R,C> v,
C context)
Accept the visitor with the given context
|
static Constant<Boolean> |
create(boolean b) |
static Constant<Byte> |
create(byte i) |
static Constant<Character> |
create(char i) |
static <T> Constant<Class<T>> |
create(Class<T> constant) |
static Constant<Integer> |
create(int i) |
static Constant<Long> |
create(long i) |
static Constant<Short> |
create(short i) |
static Constant<String> |
create(String str) |
boolean |
equals(Object o) |
T |
getConstant()
Get the constant
|
getType, hashCode, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getType
public ConstantImpl(T constant)
constant
- public <R,C> R accept(Visitor<R,C> v, C context)
Expression
accept
in interface Expression<T>
R
- return typeC
- context typev
- visitorcontext
- context of visitpublic T getConstant()
Constant
getConstant
in interface Constant<T>
Copyright © 2007-2013 Mysema Ltd. All Rights Reserved.