CompareOperator to avoid confusion with Comparator.@Deprecated public enum Comparator extends Enum<Comparator> implements SimpleDatatype<String>, NlsObject
Comparator represents a function that compares two given values.| Enum Constant and Description |
|---|
EQUAL
Deprecated.
Comparator to check if objects are equal. |
GREATER_OR_EQUAL
Deprecated.
Comparator to check if some value is greater or equal to another. |
GREATER_THAN
Deprecated.
Comparator to check if some value is greater than another. |
LESS_OR_EQUAL
Deprecated.
Comparator to check if some value is less or equal than another. |
LESS_THAN
Deprecated.
Comparator to check if some value is less than another. |
NOT_EQUAL
Deprecated.
Comparator to check if objects are NOT equal. |
| Modifier and Type | Field and Description |
|---|---|
private String |
title
Deprecated.
|
private String |
value
Deprecated.
|
KEY_ANNOTATION, KEY_ARGUMENT, KEY_CAPACITY, KEY_CONTAINER, KEY_DEFAULT, KEY_DIRECTORY, KEY_ERROR, KEY_EXISTING, KEY_EXPECTED, KEY_FILE, KEY_FUNCTION, KEY_ID, KEY_KEY, KEY_LOCATION, KEY_MAX, KEY_MIN, KEY_MODE, KEY_NAME, KEY_OBJECT, KEY_OPERAND, KEY_OPERATION, KEY_OPTION, KEY_PATH, KEY_PROPERTY, KEY_QUERY, KEY_RESOURCE, KEY_SIZE, KEY_SOURCE, KEY_TARGET_TYPE, KEY_TITLE, KEY_TYPE, KEY_URI, KEY_USER, KEY_VALUE| Modifier and Type | Method and Description |
|---|---|
private Object |
convert(Object object,
Class<?> otherType)
Deprecated.
|
abstract boolean |
eval(double arg1,
double arg2)
Deprecated.
This method evaluates this
Comparator for the given arguments. |
boolean |
eval(Object arg1,
Object arg2)
Deprecated.
This method evaluates this
Comparator for the given arguments. |
private boolean |
evalComparable(Comparable arg1,
Comparable arg2)
Deprecated.
This method handles
eval(Object, Object) for two Comparables. |
static Comparator |
fromValue(String value)
Deprecated.
This method gets the
Comparator for the given symbol. |
private static NlsBundleUtilCoreRoot |
getBundle()
Deprecated.
|
String |
getValue()
Deprecated.
This method gets the symbol of the
Comparator. |
(package private) boolean |
isTrueIfEquals()
Deprecated.
|
(package private) boolean |
isTrueIfGreater()
Deprecated.
|
(package private) boolean |
isTrueIfLess()
Deprecated.
|
String |
toString()
Deprecated.
|
static Comparator |
valueOf(String name)
Deprecated.
Returns the enum constant of this type with the specified name.
|
static Comparator[] |
values()
Deprecated.
Returns an array containing the constants of this enum type, in
the order they are declared.
|
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, valueOftoNlsMessagepublic static final Comparator GREATER_THAN
Comparator to check if some value is greater than another.public static final Comparator GREATER_OR_EQUAL
Comparator to check if some value is greater or equal to another.public static final Comparator LESS_THAN
Comparator to check if some value is less than another.public static final Comparator LESS_OR_EQUAL
Comparator to check if some value is less or equal than another.public static final Comparator EQUAL
Comparator to check if objects are equal.public static final Comparator NOT_EQUAL
Comparator to check if objects are NOT equal.private final String value
getValue()private final String title
toString()public static Comparator[] values()
for (Comparator c : Comparator.values()) System.out.println(c);
public static Comparator 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 nullboolean isTrueIfEquals()
true if this Comparator evaluates to
true for Objects that are equal to each other,
false otherwise.boolean isTrueIfLess()
true if this Comparator evaluates to
true in case the first argument is less than the second, false
otherwise.boolean isTrueIfGreater()
true if this Comparator evaluates to
true in case the first argument is greater than the second, false
otherwise.public String getValue()
Comparator. E.g. "==", ">", ">=", etc.getValue in interface AttributeReadValue<String>getValue in interface SimpleDatatype<String>private static NlsBundleUtilCoreRoot getBundle()
NlsBundleUtilCoreRoot.public abstract boolean eval(double arg1,
double arg2)
Comparator for the given arguments.arg1 - is the first argument.arg2 - is the second argument.Comparator applied to the given arguments.private Object convert(Object object, Class<?> otherType)
object - is the value to convert.otherType - the type of the value to compare that differs from the typevalue or the same value if on simpler type
is known.ComparatorHelper.convert(Object, Class)private boolean evalComparable(Comparable arg1, Comparable arg2)
eval(Object, Object) for two Comparables.arg1 - is the first argument.arg2 - is the second argument.Comparator applied to the given arguments.public boolean eval(Object arg1, Object arg2)
Comparator for the given arguments.arg1 - is the first argument.arg2 - is the second argument.Comparator applied to the given arguments.public String toString()
String representation of this Datatype. While the general contract
of Object.toString() is very weak and mainly used for debugging, the contract here is very
strong. The returned String has to be suitable for end-users and official output to any kind of
sink. NlsMessage for this purpose and implement
NlsObject if you want to support I18N/L10N.public static Comparator fromValue(String value)
Comparator for the given symbol.value - is the symbol of the requested Comparator.Comparator or null if no such Comparator exists.Copyright © 2001–2015 mmm-Team. All rights reserved.