public enum Operator extends Enum<Operator>
Operators used by a few conditions based on comparable values (e.g., numbers, dates, etc.). Facilitates specifying/parsing such operators as strings
Operators can be parsed using symbols or text abbreviations. Text abbreviations are useful when you do now want to concern yourself when used in XML. Possible representations are:
Symbol | Abbreviation | Meaning |
---|---|---|
> | gt | greater than |
>=, => | ge | greater equal |
< | lt | lower than |
<=, =< | le | lowe equal |
=, == | eq,is | equals |
Enum Constant and Description |
---|
EQUALS |
GREATER_EQUAL |
GREATER_THAN |
LOWER_EQUAL |
LOWER_THAN |
Modifier and Type | Method and Description |
---|---|
abstract <T extends Comparable<T>> |
evaluate(T first,
T second) |
static Operator |
of(String op) |
String |
toString() |
static Operator |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static Operator[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final Operator GREATER_THAN
public static final Operator GREATER_EQUAL
public static final Operator EQUALS
public static final Operator LOWER_EQUAL
public static final Operator LOWER_THAN
public static Operator[] values()
for (Operator c : Operator.values()) System.out.println(c);
public static Operator valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic abstract <T extends Comparable<T>> boolean evaluate(T first, T second)
Copyright © 2008–2023 Norconex Inc.. All rights reserved.