Class ObjectExpressionVariable
java.lang.Object
com.broadleafcommerce.rulesengine.expression.util.ObjectExpressionVariable
- All Implemented Interfaces:
ExpressionVariable
General object utilities
- Author:
- Phillip Verheyden (phillipuniverse)
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetName()
boolean
A given object is defined as 'empty' if the following is true: The object isnull
The object is a Collection or array and the collection or array is empty (no items) The object is a String and the string is empty (no characters)boolean
isNotEmpty
(Object o) The opposite ofisEmpty(Object)
-
Field Details
-
NAME
- See Also:
-
-
Constructor Details
-
ObjectExpressionVariable
public ObjectExpressionVariable()
-
-
Method Details
-
getName
- Specified by:
getName
in interfaceExpressionVariable
- Returns:
- Name of the variable, must not be null
-
isEmpty
A given object is defined as 'empty' if the following is true:- The object is
null
- The object is a Collection or array and the collection or array is empty (no items)
- The object is a String and the string is empty (no characters)
- Parameters:
o
- the object to check- Returns:
- whether or not the given object is 'empty'
- The object is
-
isNotEmpty
The opposite ofisEmpty(Object)
- Parameters:
o
- the object to check- Returns:
- whether or not the given object is 'empty'
-