com.espertech.esper.filter
Enum FilterOperator

java.lang.Object
  extended by java.lang.Enum<FilterOperator>
      extended by com.espertech.esper.filter.FilterOperator
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<FilterOperator>

public enum FilterOperator
extends java.lang.Enum<FilterOperator>

Defines the different operator types available for event filters. Mathematical notation for defining ranges of floating point numbers is used as defined below:

[a,b] a closed range from value a to value b with the end-points a and b included in the range

(a,b) an open range from value a to value b with the end-points a and b not included in the range

[a,b) a half-open range from value a to value b with the end-point a included and end-point b not included in the range

(a,b] a half-open range from value a to value b with the end-point a not included and end-point b included in the range


Enum Constant Summary
BOOLEAN_EXPRESSION
          Boolean expression filter operator
EQUAL
          Exact matches (=).
GREATER
          Greater (>).
GREATER_OR_EQUAL
          Greater or equal (>=).
IN_LIST_OF_VALUES
          List of values using the 'in' operator
IS
          Exact matches allowing null (is).
IS_NOT
          Exact not matches allowing null (is not).
LESS
          Less (<).
LESS_OR_EQUAL
          Less or equal (<=).
NOT_EQUAL
          Exact not matche (!=).
NOT_IN_LIST_OF_VALUES
          Not-in list of values using the 'not in' operator
NOT_RANGE_CLOSED
          Inverted-Range contains low and high endpoint, i.e.
NOT_RANGE_HALF_CLOSED
          Inverted-Range includes high endpoint but not low endpoint, i.e.
NOT_RANGE_HALF_OPEN
          Inverted-Range includes low endpoint but not high endpoint, i.e.
NOT_RANGE_OPEN
          Inverted-Range contains neither endpoint, i.e.
RANGE_CLOSED
          Range contains low and high endpoint, i.e.
RANGE_HALF_CLOSED
          Range includes high endpoint but not low endpoint, i.e.
RANGE_HALF_OPEN
          Range includes low endpoint but not high endpoint, i.e.
RANGE_OPEN
          Range contains neither endpoint, i.e.
 
Method Summary
 java.lang.String getTextualOp()
           
 boolean isComparisonOperator()
          Returns true for relational comparison operators which excludes the = equals operator, else returns false.
 boolean isInvertedRangeOperator()
          Returns true for inverted range operators, false if not an inverted range operator.
 boolean isRangeOperator()
          Returns true for all range operators, false if not a range operator.
static FilterOperator parseRangeOperator(boolean isInclusiveFirst, boolean isInclusiveLast, boolean isNot)
          Parse the range operator from booleans describing whether the start or end values are exclusive.
 FilterOperator reversedRelationalOp()
           
static FilterOperator valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static FilterOperator[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

EQUAL

public static final FilterOperator EQUAL
Exact matches (=).


NOT_EQUAL

public static final FilterOperator NOT_EQUAL
Exact not matche (!=).


IS

public static final FilterOperator IS
Exact matches allowing null (is).


IS_NOT

public static final FilterOperator IS_NOT
Exact not matches allowing null (is not).


LESS

public static final FilterOperator LESS
Less (<).


LESS_OR_EQUAL

public static final FilterOperator LESS_OR_EQUAL
Less or equal (<=).


GREATER_OR_EQUAL

public static final FilterOperator GREATER_OR_EQUAL
Greater or equal (>=).


GREATER

public static final FilterOperator GREATER
Greater (>).


RANGE_OPEN

public static final FilterOperator RANGE_OPEN
Range contains neither endpoint, i.e. (a,b)


RANGE_CLOSED

public static final FilterOperator RANGE_CLOSED
Range contains low and high endpoint, i.e. [a,b]


RANGE_HALF_OPEN

public static final FilterOperator RANGE_HALF_OPEN
Range includes low endpoint but not high endpoint, i.e. [a,b)


RANGE_HALF_CLOSED

public static final FilterOperator RANGE_HALF_CLOSED
Range includes high endpoint but not low endpoint, i.e. (a,b]


NOT_RANGE_OPEN

public static final FilterOperator NOT_RANGE_OPEN
Inverted-Range contains neither endpoint, i.e. (a,b)


NOT_RANGE_CLOSED

public static final FilterOperator NOT_RANGE_CLOSED
Inverted-Range contains low and high endpoint, i.e. [a,b]


NOT_RANGE_HALF_OPEN

public static final FilterOperator NOT_RANGE_HALF_OPEN
Inverted-Range includes low endpoint but not high endpoint, i.e. [a,b)


NOT_RANGE_HALF_CLOSED

public static final FilterOperator NOT_RANGE_HALF_CLOSED
Inverted-Range includes high endpoint but not low endpoint, i.e. (a,b]


IN_LIST_OF_VALUES

public static final FilterOperator IN_LIST_OF_VALUES
List of values using the 'in' operator


NOT_IN_LIST_OF_VALUES

public static final FilterOperator NOT_IN_LIST_OF_VALUES
Not-in list of values using the 'not in' operator


BOOLEAN_EXPRESSION

public static final FilterOperator BOOLEAN_EXPRESSION
Boolean expression filter operator

Method Detail

values

public static FilterOperator[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (FilterOperator c : FilterOperator.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static FilterOperator valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
java.lang.NullPointerException - if the argument is null

isRangeOperator

public boolean isRangeOperator()
Returns true for all range operators, false if not a range operator.

Returns:
true for ranges, false for anyting else

isInvertedRangeOperator

public boolean isInvertedRangeOperator()
Returns true for inverted range operators, false if not an inverted range operator.

Returns:
true for inverted ranges, false for anyting else

isComparisonOperator

public boolean isComparisonOperator()
Returns true for relational comparison operators which excludes the = equals operator, else returns false.

Returns:
true for lesser or greater -type operators, false for anyting else

parseRangeOperator

public static FilterOperator parseRangeOperator(boolean isInclusiveFirst,
                                                boolean isInclusiveLast,
                                                boolean isNot)
Parse the range operator from booleans describing whether the start or end values are exclusive.

Parameters:
isInclusiveFirst - true if low endpoint is inclusive, false if not
isInclusiveLast - true if high endpoint is inclusive, false if not
isNot - is true if this is an inverted range, or false if a regular range
Returns:
FilterOperator for the combination inclusive or exclusive

getTextualOp

public java.lang.String getTextualOp()

reversedRelationalOp

public FilterOperator reversedRelationalOp()

© 2006-2015 EsperTech Inc.
All rights reserved.
Visit us at espertech.com