Class Conditionals
java.lang.Object
com.broadleafcommerce.metadata.dsl.core.utils.Conditionals
Utility class with helpers for creating
Conditional
.- Author:
- Nick Crum (ncrum)
-
Method Summary
Modifier and TypeMethodDescriptionstatic DefaultLogicalConditional
and
(Conditional<?>... conditionals) Creates a new logical-and conditional for the provided conditionals.static DefaultLogicalConditional
and
(List<Conditional<?>> conditionals) Creates a new logical-and conditional for the provided conditionals.static DefaultLogicalConditional
not
(Conditional<?>... conditionals) Creates a new logical-not conditional for the provided conditionals.static DefaultLogicalConditional
not
(List<Conditional<?>> conditionals) Creates a new logical-not conditional for the provided conditionals.static DefaultLogicalConditional
or
(Conditional<?>... conditionals) Creates a new logical-or conditional for the provided conditionals.static DefaultLogicalConditional
or
(List<Conditional<?>> conditionals) Creates a new logical-or conditional for the provided conditionals.static DefaultPropertyConditional
Creates a new property conditional for the provided property name.static DefaultCollectionConditional
whenCollection
(String field) Creates a new collection conditional for the provided property name.
-
Method Details
-
when
Creates a new property conditional for the provided property name.- Parameters:
field
- the name of the property- Returns:
- the conditional
-
whenCollection
Creates a new collection conditional for the provided property name.- Parameters:
field
- the name of the property- Returns:
- the conditional
-
and
Creates a new logical-and conditional for the provided conditionals.- Parameters:
conditionals
- the conditionals to logical-and- Returns:
- the conditional
-
and
Creates a new logical-and conditional for the provided conditionals.- Parameters:
conditionals
- the conditionals to logical-and- Returns:
- the conditional
-
or
Creates a new logical-or conditional for the provided conditionals.- Parameters:
conditionals
- the conditionals to logical-or- Returns:
- the conditional
-
or
Creates a new logical-or conditional for the provided conditionals.- Parameters:
conditionals
- the conditionals to logical-or- Returns:
- the conditional
-
not
Creates a new logical-not conditional for the provided conditionals.- Parameters:
conditionals
- the conditionals to logical-not- Returns:
- the conditional
-
not
Creates a new logical-not conditional for the provided conditionals.- Parameters:
conditionals
- the conditionals to logical-not- Returns:
- the conditional
-