net.sf.saffron.rex
Class RexLiteral
java.lang.Object
|
+--net.sf.saffron.rex.RexNode
|
+--net.sf.saffron.rex.RexLiteral
- public class RexLiteral
- extends RexNode
Constant value in a row-expression.
There are several methods for creating literals in RexBuilder
:
RexBuilder.makeLiteral(boolean)
and so forth.
- Since:
- Nov 24, 2003
- Version:
- $Id: $
- Author:
- jhyde
value
public final Object value
type
private final SaffronType type
RexLiteral
RexLiteral(Object value,
SaffronType type)
- Creates a
SqlLiteral
.
- Pre-condition:
- value instanceof String ||
value instanceof BigInteger ||
value instanceof Boolean ||
value == null
format
private static String format(Object value,
SaffronType type)
getType
public SaffronType getType()
- Specified by:
getType
in class RexNode
getKind
public RexKind getKind()
- Description copied from class:
RexNode
- Returns the kind of node this is.
- Overrides:
getKind
in class RexNode
- Returns:
- A
RexKind
value, never null
getValue
public Object getValue()
- Returns the value of this literal.
- Post-condition:
- return instanceof String ||
return instanceof BigInteger ||
return instanceof Boolean ||
return == null
booleanValue
public static boolean booleanValue(RexNode node)
equals
public boolean equals(Object obj)
- Overrides:
equals
in class Object
hashCode
public int hashCode()
- Overrides:
hashCode
in class Object
intValue
public static int intValue(SqlNode node)
clone
public Object clone()
- Specified by:
clone
in class RexNode
unparse
public void unparse(SqlWriter writer)
equals
private static boolean equals(Object o1,
Object o2)