Class ConstantExpression
- java.lang.Object
-
- org.apache.qpid.jms.selector.filter.ConstantExpression
-
- All Implemented Interfaces:
Expression
public class ConstantExpression extends java.lang.Object implements Expression
Represents a constant expression
-
-
Field Summary
Fields Modifier and Type Field Description static org.apache.qpid.jms.selector.filter.ConstantExpression.BooleanConstantExpressionFALSEstatic org.apache.qpid.jms.selector.filter.ConstantExpression.BooleanConstantExpressionNULLstatic org.apache.qpid.jms.selector.filter.ConstantExpression.BooleanConstantExpressionTRUE
-
Constructor Summary
Constructors Constructor Description ConstantExpression(java.lang.Object value)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ConstantExpressioncreateFloat(java.lang.String text)static ConstantExpressioncreateFromDecimal(java.lang.String text)static ConstantExpressioncreateFromHex(java.lang.String text)static ConstantExpressioncreateFromOctal(java.lang.String text)static java.lang.StringencodeString(java.lang.String s)Encodes the value of string so that it looks like it would look like when it was provided in a selector.booleanequals(java.lang.Object o)TODO: more efficient hashCode()java.lang.Objectevaluate(Filterable message)java.lang.ObjectgetValue()inthashCode()TODO: more efficient hashCode()java.lang.StringtoString()
-
-
-
Field Detail
-
NULL
public static final org.apache.qpid.jms.selector.filter.ConstantExpression.BooleanConstantExpression NULL
-
TRUE
public static final org.apache.qpid.jms.selector.filter.ConstantExpression.BooleanConstantExpression TRUE
-
FALSE
public static final org.apache.qpid.jms.selector.filter.ConstantExpression.BooleanConstantExpression FALSE
-
-
Method Detail
-
createFromDecimal
public static ConstantExpression createFromDecimal(java.lang.String text)
-
createFromHex
public static ConstantExpression createFromHex(java.lang.String text)
-
createFromOctal
public static ConstantExpression createFromOctal(java.lang.String text)
-
createFloat
public static ConstantExpression createFloat(java.lang.String text)
-
evaluate
public java.lang.Object evaluate(Filterable message) throws FilterException
- Specified by:
evaluatein interfaceExpression- Parameters:
message- The message that is being selected against.- Returns:
- the value of this expression
- Throws:
FilterException- if an error occurs during evaluation.
-
getValue
public java.lang.Object getValue()
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object- See Also:
Object.toString()
-
hashCode
public int hashCode()
TODO: more efficient hashCode()- Overrides:
hashCodein classjava.lang.Object- See Also:
Object.hashCode()
-
equals
public boolean equals(java.lang.Object o)
TODO: more efficient hashCode()- Overrides:
equalsin classjava.lang.Object- See Also:
Object.equals(java.lang.Object)
-
encodeString
public static java.lang.String encodeString(java.lang.String s)
Encodes the value of string so that it looks like it would look like when it was provided in a selector.- Parameters:
s- the original string- Returns:
- the encoded String
-
-