Class DefaultCollectionConditional
java.lang.Object
com.broadleafcommerce.metadata.dsl.core.extension.conditionals.DefaultCollectionConditional
- All Implemented Interfaces:
Conditional<DefaultCollectionConditional>
,Copyable<DefaultCollectionConditional>
,CollectionConditional<DefaultCollectionConditional>
,Serializable
public class DefaultCollectionConditional
extends Object
implements Serializable, CollectionConditional<DefaultCollectionConditional>
The default implementation of
CollectionConditional
.- Author:
- Nick Crum (ncrum)
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.broadleafcommerce.metadata.dsl.core.extension.conditionals.CollectionConditional
CollectionConditional.CollectionConditionalMatchStrategy
-
Field Summary
Fields inherited from interface com.broadleafcommerce.metadata.dsl.core.extension.conditionals.CollectionConditional
TYPE
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
copy()
boolean
List<Conditional<?>>
Conditionals that will be matched against the collection members.getField()
Field name target for this conditional.The match strategy for this conditional.int
hashCode()
boolean
Whether or not empty is considered a valid match.void
setConditionals
(List<Conditional<?>> conditionals) Conditionals that will be matched against the collection members.void
Field name target for this conditional.void
setMatchIfEmpty
(boolean matchIfEmpty) Whether or not empty is considered a valid match.void
setMatchStrategy
(String matchStrategy) The match strategy for this conditional.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.broadleafcommerce.metadata.dsl.core.extension.conditionals.CollectionConditional
allMatch, anyMatch, clearConditionals, conditional, conditionals, field, getType, matchIfEmpty, matchStrategy, notMatchIfEmpty
Methods inherited from interface com.broadleafcommerce.metadata.dsl.core.Conditional
self
-
Constructor Details
-
DefaultCollectionConditional
-
DefaultCollectionConditional
-
-
Method Details
-
copy
- Specified by:
copy
in interfaceCopyable<DefaultCollectionConditional>
- Returns:
- a deep copy of this instance
-
getField
Field name target for this conditional.- Specified by:
getField
in interfaceCollectionConditional<DefaultCollectionConditional>
-
getMatchStrategy
The match strategy for this conditional. IfCollectionConditional.CollectionConditionalMatchStrategy.ALL
, this will match only when all collection members are a match. IfCollectionConditional.CollectionConditionalMatchStrategy.ANY
, this will match when at least one collection member is a match.- Specified by:
getMatchStrategy
in interfaceCollectionConditional<DefaultCollectionConditional>
-
getConditionals
Conditionals that will be matched against the collection members.- Specified by:
getConditionals
in interfaceCollectionConditional<DefaultCollectionConditional>
-
isMatchIfEmpty
public boolean isMatchIfEmpty()Whether or not empty is considered a valid match.- Specified by:
isMatchIfEmpty
in interfaceCollectionConditional<DefaultCollectionConditional>
-
setField
Field name target for this conditional.- Specified by:
setField
in interfaceCollectionConditional<DefaultCollectionConditional>
-
setMatchStrategy
The match strategy for this conditional. IfCollectionConditional.CollectionConditionalMatchStrategy.ALL
, this will match only when all collection members are a match. IfCollectionConditional.CollectionConditionalMatchStrategy.ANY
, this will match when at least one collection member is a match.- Specified by:
setMatchStrategy
in interfaceCollectionConditional<DefaultCollectionConditional>
-
setConditionals
Conditionals that will be matched against the collection members.- Specified by:
setConditionals
in interfaceCollectionConditional<DefaultCollectionConditional>
-
setMatchIfEmpty
public void setMatchIfEmpty(boolean matchIfEmpty) Whether or not empty is considered a valid match.- Specified by:
setMatchIfEmpty
in interfaceCollectionConditional<DefaultCollectionConditional>
-
equals
-
canEqual
-
hashCode
public int hashCode()
-