Package org.apache.activemq.artemis.selector.filter

## Class ConstantExpression

- java.lang.Object
- - org.apache.activemq.artemis.selector.filter.ConstantExpression

- All Implemented Interfaces:
    `Expression`

      public class ConstantExpression
      extends java.lang.Object
      implements Expression

  Represents a constant expression
  Version:
    $Revision: 1.2 $

- - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `static org.apache.activemq.artemis.selector.filter.ConstantExpression.BooleanConstantExpression` | `FALSE` |
    `static org.apache.activemq.artemis.selector.filter.ConstantExpression.BooleanConstantExpression` | `NULL` |
    `static org.apache.activemq.artemis.selector.filter.ConstantExpression.BooleanConstantExpression` | `TRUE` |

  - ### 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 ConstantExpression` | `createFloat​(java.lang.String text)` |
    `static ConstantExpression` | `createFromDecimal​(java.lang.String text)` |
    `static ConstantExpression` | `createFromHex​(java.lang.String text)` |
    `static ConstantExpression` | `createFromOctal​(java.lang.String text)` |
    `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.
    `boolean` | `equals​(java.lang.Object o)` |
    `java.lang.Object` | `evaluate​(Filterable message)` |
    `java.lang.Object` | `getValue()` |
    `int` | `hashCode()` |
    `java.lang.String` | `toString()` |

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### NULL

          public static final org.apache.activemq.artemis.selector.filter.ConstantExpression.BooleanConstantExpression NULL

    - #### TRUE

          public static final org.apache.activemq.artemis.selector.filter.ConstantExpression.BooleanConstantExpression TRUE

    - #### FALSE

          public static final org.apache.activemq.artemis.selector.filter.ConstantExpression.BooleanConstantExpression FALSE

  - ### Constructor Detail

    - #### ConstantExpression

          public ConstantExpression​(java.lang.Object value)

  - ### 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:
        `evaluate` in interface `Expression`
      Returns:
        the value of this expression
      Throws:
        `FilterException`

    - #### 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()

      Overrides:
        `hashCode` in class `java.lang.Object`
      See Also:
        `Object.hashCode()`

    - #### equals

          public boolean equals​(java.lang.Object o)

      Overrides:
        `equals` in class `java.lang.Object`
      See Also:
        `Object.equals(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` -
      Returns: