com.mysema.query.types
Class ConstantImpl<T>

java.lang.Object
  extended by com.mysema.query.types.ExpressionBase<T>
      extended by com.mysema.query.types.ConstantImpl<T>
All Implemented Interfaces:
Constant<T>, Expression<T>, Serializable

public class ConstantImpl<T>
extends ExpressionBase<T>
implements Constant<T>

ConstantImpl is the default implementation of the Constant interface

Author:
tiwe
See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.mysema.query.types.ExpressionBase
type
 
Constructor Summary
ConstantImpl(Class<T> type, T constant)
           
ConstantImpl(T constant)
           
 
Method Summary
<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
<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)
           
static Constant<String> create(String str, boolean populateCache)
           
 boolean equals(Object o)
           
 T getConstant()
          Get the constant
 int hashCode()
           
 
Methods inherited from class com.mysema.query.types.ExpressionBase
getType, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.mysema.query.types.Expression
getType
 

Constructor Detail

ConstantImpl

public ConstantImpl(T constant)

ConstantImpl

public ConstantImpl(Class<T> type,
                    T constant)
Method Detail

create

public static Constant<Boolean> create(boolean b)

create

public static Constant<Byte> create(byte i)

create

public static Constant<Integer> create(int i)

create

public static Constant<Long> create(long i)

create

public static Constant<Short> create(short i)

create

public static Constant<String> create(String str)

create

public static Constant<String> create(String str,
                                      boolean populateCache)

create

public static <T> Constant<Class<T>> create(Class<T> constant)

accept

public <R,C> R accept(Visitor<R,C> v,
                      C context)
Description copied from interface: Expression
Accept the visitor with the given context

Specified by:
accept in interface Expression<T>
Type Parameters:
R - return type
C - context type
Parameters:
v - visitor
context - context of visit
Returns:

equals

public boolean equals(Object o)
Overrides:
equals in class Object

getConstant

public T getConstant()
Description copied from interface: Constant
Get the constant

Specified by:
getConstant in interface Constant<T>
Returns:

hashCode

public int hashCode()
Overrides:
hashCode in class Object


Copyright © 2007-2011 Mysema Ltd. All Rights Reserved.