com.mysema.query.types.expr
Class ENumberConst<D extends Number & Comparable<?>>

java.lang.Object
  extended by com.mysema.query.types.Expr<D>
      extended by com.mysema.query.types.expr.ESimple<D>
          extended by com.mysema.query.types.expr.EComparableBase<D>
              extended by com.mysema.query.types.expr.ENumber<D>
                  extended by com.mysema.query.types.expr.ENumberConst<D>
Type Parameters:
D -
All Implemented Interfaces:
Constant<D>, Serializable

public final class ENumberConst<D extends Number & Comparable<?>>
extends ENumber<D>
implements Constant<D>

ENumberConst represents numeric constants

Author:
tiwe
See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.mysema.query.types.Expr
primitive
 
Method Summary
 void accept(Visitor v)
           
<N extends Number & Comparable<?>>
ENumber<D>
add(Expr<N> right)
          Get the sum of this and right
 ENumber<D> add(Number right)
          Get the sum of this and right
 ENumber<Byte> byteValue()
          Get the byte expression of this numeric expression
static ENumber<Byte> create(byte i)
           
static ENumber<Integer> create(int i)
           
static ENumber<Long> create(long i)
           
static ENumber<Short> create(short i)
           
static
<T extends Number & Comparable<?>>
ENumber<T>
create(T val)
          Factory method
 ENumber<Double> doubleValue()
          Get the double expression of this numeric expression
 EBoolean eq(D b)
          Get a this == right expression
 boolean equals(Object o)
           
 ENumber<Float> floatValue()
          Get the float expression of this numeric expression
 D getConstant()
          Get the constant
 int hashCode()
           
 ENumber<Long> longValue()
          Get the long expression of this numeric expression
 EBoolean ne(D b)
          Get a this <> right expression
 ENumber<Short> shortValue()
          Get the short expression of this numeric expression
<N extends Number & Comparable<?>>
ENumber<D>
subtract(Expr<N> right)
          Get the difference of this and right
 ENumber<D> subtract(Number right)
          Get the difference of this and right
 
Methods inherited from class com.mysema.query.types.expr.ENumber
abs, as, avg, between, between, castToNum, ceil, divide, divide, floor, goe, goe, gt, gt, in, in, intValue, loe, loe, lt, lt, max, max, min, min, multiply, multiply, negate, notBetween, notBetween, notIn, random, round, sqrt, sum
 
Methods inherited from class com.mysema.query.types.expr.EComparableBase
asc, desc, stringValue
 
Methods inherited from class com.mysema.query.types.expr.ESimple
count, countDistinct, eq, in, in, ne, when, when
 
Methods inherited from class com.mysema.query.types.Expr
asExpr, getType, notIn, notIn, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.mysema.query.types.Constant
asExpr
 

Method Detail

create

public static ENumber<Byte> create(byte i)

create

public static ENumber<Integer> create(int i)

create

public static ENumber<Long> create(long i)

create

public static ENumber<Short> create(short i)

create

public static <T extends Number & Comparable<?>> ENumber<T> create(T val)
Factory method

Type Parameters:
T -
Parameters:
val -
Returns:

eq

public EBoolean eq(D b)
Description copied from class: Expr
Get a this == right expression

Overrides:
eq in class ESimple<D extends Number & Comparable<?>>
Parameters:
b - rhs of the comparison
Returns:

equals

public boolean equals(Object o)
Specified by:
equals in class Expr<D extends Number & Comparable<?>>

getConstant

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

Specified by:
getConstant in interface Constant<D extends Number & Comparable<?>>
Returns:

hashCode

public int hashCode()
Overrides:
hashCode in class Expr<D extends Number & Comparable<?>>

ne

public EBoolean ne(D b)
Description copied from class: Expr
Get a this <> right expression

Overrides:
ne in class ESimple<D extends Number & Comparable<?>>
Parameters:
b - rhs of the comparison
Returns:

accept

public void accept(Visitor v)
Specified by:
accept in class Expr<D extends Number & Comparable<?>>

add

public ENumber<D> add(Number right)
Description copied from class: ENumber
Get the sum of this and right

Overrides:
add in class ENumber<D extends Number & Comparable<?>>
Returns:
this + right

add

public <N extends Number & Comparable<?>> ENumber<D> add(Expr<N> right)
Description copied from class: ENumber
Get the sum of this and right

Overrides:
add in class ENumber<D extends Number & Comparable<?>>
Returns:
this + right

subtract

public ENumber<D> subtract(Number right)
Description copied from class: ENumber
Get the difference of this and right

Overrides:
subtract in class ENumber<D extends Number & Comparable<?>>
Returns:
this - right

subtract

public <N extends Number & Comparable<?>> ENumber<D> subtract(Expr<N> right)
Description copied from class: ENumber
Get the difference of this and right

Overrides:
subtract in class ENumber<D extends Number & Comparable<?>>
Returns:
this - right

byteValue

public ENumber<Byte> byteValue()
Description copied from class: ENumber
Get the byte expression of this numeric expression

Overrides:
byteValue in class ENumber<D extends Number & Comparable<?>>
Returns:
this.byteValue()
See Also:
Number.byteValue()

doubleValue

public ENumber<Double> doubleValue()
Description copied from class: ENumber
Get the double expression of this numeric expression

Overrides:
doubleValue in class ENumber<D extends Number & Comparable<?>>
Returns:
this.doubleValue()
See Also:
Number.doubleValue()

floatValue

public ENumber<Float> floatValue()
Description copied from class: ENumber
Get the float expression of this numeric expression

Overrides:
floatValue in class ENumber<D extends Number & Comparable<?>>
Returns:
this.floatValue()
See Also:
Number.floatValue()

longValue

public ENumber<Long> longValue()
Description copied from class: ENumber
Get the long expression of this numeric expression

Overrides:
longValue in class ENumber<D extends Number & Comparable<?>>
Returns:
this.longValue()
See Also:
Number.longValue()

shortValue

public ENumber<Short> shortValue()
Description copied from class: ENumber
Get the short expression of this numeric expression

Overrides:
shortValue in class ENumber<D extends Number & Comparable<?>>
Returns:
this.shortValue()
See Also:
Number.shortValue()


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