Package org.apache.qpid.server.filter
Class ConstantExpression<T>
- java.lang.Object
-
- org.apache.qpid.server.filter.ConstantExpression<T>
-
- All Implemented Interfaces:
Expression<T>
public class ConstantExpression<T> extends Object implements Expression<T>
Represents a constant expression
-
-
Field Summary
Fields Modifier and Type Field Description static org.apache.qpid.server.filter.ConstantExpression.BooleanConstantExpression
FALSE
static org.apache.qpid.server.filter.ConstantExpression.BooleanConstantExpression
NULL
static org.apache.qpid.server.filter.ConstantExpression.BooleanConstantExpression
TRUE
-
Constructor Summary
Constructors Constructor Description ConstantExpression(Object value)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static <E> ConstantExpression<E>
createFloat(String text)
static <E> ConstantExpression<E>
createFromDecimal(String text)
static <E> ConstantExpression<E>
createFromHex(String text)
static <E> ConstantExpression<E>
createFromOctal(String text)
static String
encodeString(String s)
Encodes the value of string so that it looks like it would look like when it was provided in a selector.boolean
equals(Object o)
TODO: more efficient hashCode()Object
evaluate(T message)
static <E> ConstantExpression<E>
FALSE()
Object
getValue()
int
hashCode()
TODO: more efficient hashCode()static <E> ConstantExpression<E>
NULL()
String
toString()
static <E> ConstantExpression<E>
TRUE()
-
-
-
Field Detail
-
NULL
public static final org.apache.qpid.server.filter.ConstantExpression.BooleanConstantExpression NULL
-
TRUE
public static final org.apache.qpid.server.filter.ConstantExpression.BooleanConstantExpression TRUE
-
FALSE
public static final org.apache.qpid.server.filter.ConstantExpression.BooleanConstantExpression FALSE
-
-
Constructor Detail
-
ConstantExpression
public ConstantExpression(Object value)
-
-
Method Detail
-
NULL
public static <E> ConstantExpression<E> NULL()
-
TRUE
public static <E> ConstantExpression<E> TRUE()
-
FALSE
public static <E> ConstantExpression<E> FALSE()
-
createFromDecimal
public static <E> ConstantExpression<E> createFromDecimal(String text)
-
createFromHex
public static <E> ConstantExpression<E> createFromHex(String text)
-
createFromOctal
public static <E> ConstantExpression<E> createFromOctal(String text)
-
createFloat
public static <E> ConstantExpression<E> createFloat(String text)
-
evaluate
public Object evaluate(T message)
- Specified by:
evaluate
in interfaceExpression<T>
- Parameters:
message
- object to evaluate- Returns:
- the value of this expression
-
getValue
public Object getValue()
-
toString
public String toString()
- Overrides:
toString
in classObject
- See Also:
Object.toString()
-
hashCode
public int hashCode()
TODO: more efficient hashCode()- Overrides:
hashCode
in classObject
- See Also:
Object.hashCode()
-
equals
public boolean equals(Object o)
TODO: more efficient hashCode()- Overrides:
equals
in classObject
- See Also:
Object.equals(java.lang.Object)
-
-