Enum Class ComparisonOperator
java.lang.Object
java.lang.Enum<ComparisonOperator>
org.kuali.rice.krms.framework.engine.expression.ComparisonOperator
- All Implemented Interfaces:
Serializable,Comparable<ComparisonOperator>,Constable,org.kuali.rice.core.api.mo.common.Coded
public enum ComparisonOperator
extends Enum<ComparisonOperator>
implements org.kuali.rice.core.api.mo.common.Coded
Operators enumeration for comparing objects. EQUALS NOT_EQUALS GREATER_THAN GREATER_THAN_EQUAL LESS_THAN LESS_THAN_EQUAL.
Uses registered
EngineComparatorExtension for the given objects or the DefaultComparisonOperator.- Author:
- Kuali Rice Team (rice.collab@kuali.org)
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionuse this flag with the static factory to get aComparisonOperatorDOES_NOT_EXISTSuse this flag with the static factory to get aComparisonOperatorEQUALSuse this flag with the static factory to get aComparisonOperatorEXISTSuse this flag with the static factory to get aComparisonOperatorGREATER_THANuse this flag with the static factory to get aComparisonOperatorGREATER_THAN_EQUALuse this flag with the static factory to get aComparisonOperatorLESS_THANuse this flag with the static factory to get aComparisonOperatorLESS_THAN_EQUALuse this flag with the static factory to get aComparisonOperatorNOT_EQUALS -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Collection<String> Operator codes, unmodifiable Collectionstatic final Collection<String> Operator names, unmodifiable Collection -
Method Summary
Modifier and TypeMethodDescriptionbooleanCompare the given objectsstatic ComparisonOperatorCreate a ComparisonOperator from the given codegetCode()voidsetComparisonOperatorService(ComparisonOperatorService comparisonOperatorService) toString()static ComparisonOperatorReturns the enum constant of this class with the specified name.static ComparisonOperator[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
EQUALS
use this flag with the static factory to get aComparisonOperatorEQUALS -
NOT_EQUALS
use this flag with the static factory to get aComparisonOperatorNOT_EQUALS -
GREATER_THAN
use this flag with the static factory to get aComparisonOperatorGREATER_THAN -
GREATER_THAN_EQUAL
use this flag with the static factory to get aComparisonOperatorGREATER_THAN_EQUAL -
LESS_THAN
use this flag with the static factory to get aComparisonOperatorLESS_THAN -
LESS_THAN_EQUAL
use this flag with the static factory to get aComparisonOperatorLESS_THAN_EQUAL -
EXISTS
use this flag with the static factory to get aComparisonOperatorEXISTS -
DOES_NOT_EXIST
use this flag with the static factory to get aComparisonOperatorDOES_NOT_EXISTS
-
-
Field Details
-
OPERATOR_CODES
Operator codes, unmodifiable Collection -
OPERATOR_NAMES
Operator names, unmodifiable Collection
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
getCode
- Specified by:
getCodein interfaceorg.kuali.rice.core.api.mo.common.Coded- Returns:
- code representing the type of operator
-
fromCode
Create a ComparisonOperator from the given code- Parameters:
code- for type of ComparisonOperator to create- Returns:
- a ComparisonOperator created with the given code.
- Throws:
IllegalArgumentException- if the given code does not exist
-
compare
Compare the given objects- Parameters:
lhs- left hand side objectrhs- right hand side object- Returns:
- boolean value of comparison results based on the type of operator.
-
setComparisonOperatorService
-
toString
- Overrides:
toStringin classEnum<ComparisonOperator>- Returns:
- type code
-