Class ConstantExpression<T>

  • All Implemented Interfaces:
    Expression<T>

    public class ConstantExpression<T>
    extends java.lang.Object
    implements Expression<T>
    Represents a constant expression
    • 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​(java.lang.Object value)
    • Method Detail

      • createFromDecimal

        public static <E> ConstantExpression<E> createFromDecimal​(java.lang.String text)
      • createFromHex

        public static <E> ConstantExpression<E> createFromHex​(java.lang.String text)
      • createFromOctal

        public static <E> ConstantExpression<E> createFromOctal​(java.lang.String text)
      • createFloat

        public static <E> ConstantExpression<E> createFloat​(java.lang.String text)
      • evaluate

        public java.lang.Object evaluate​(T message)
        Specified by:
        evaluate in interface Expression<T>
        Parameters:
        message - object to evaluate
        Returns:
        the value of this expression
      • getValue

        public java.lang.Object getValue()
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
        See Also:
        Object.toString()
      • hashCode

        public int hashCode()
        TODO: more efficient hashCode()
        Overrides:
        hashCode in class java.lang.Object
        See Also:
        Object.hashCode()
      • equals

        public boolean equals​(java.lang.Object o)
        TODO: more efficient hashCode()
        Overrides:
        equals in class java.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 - string to encode
        Returns:
        encoded string