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 booleancopy()booleanList<Conditional<?>>Conditionals that will be matched against the collection members.getField()Field name target for this conditional.The match strategy for this conditional.inthashCode()booleanWhether or not empty is considered a valid match.voidsetConditionals(List<Conditional<?>> conditionals) Conditionals that will be matched against the collection members.voidField name target for this conditional.voidsetMatchIfEmpty(boolean matchIfEmpty) Whether or not empty is considered a valid match.voidsetMatchStrategy(String matchStrategy) The match strategy for this conditional.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.broadleafcommerce.metadata.dsl.core.extension.conditionals.CollectionConditional
allMatch, anyMatch, clearConditionals, conditional, conditionals, field, getType, matchIfEmpty, matchStrategy, notMatchIfEmptyMethods inherited from interface com.broadleafcommerce.metadata.dsl.core.Conditional
self
-
Constructor Details
-
DefaultCollectionConditional
-
DefaultCollectionConditional
-
-
Method Details
-
copy
- Specified by:
copyin interfaceCopyable<DefaultCollectionConditional>- Returns:
- a deep copy of this instance
-
getField
Field name target for this conditional.- Specified by:
getFieldin 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:
getMatchStrategyin interfaceCollectionConditional<DefaultCollectionConditional>
-
getConditionals
Conditionals that will be matched against the collection members.- Specified by:
getConditionalsin interfaceCollectionConditional<DefaultCollectionConditional>
-
isMatchIfEmpty
public boolean isMatchIfEmpty()Whether or not empty is considered a valid match.- Specified by:
isMatchIfEmptyin interfaceCollectionConditional<DefaultCollectionConditional>
-
setField
Field name target for this conditional.- Specified by:
setFieldin 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:
setMatchStrategyin interfaceCollectionConditional<DefaultCollectionConditional>
-
setConditionals
Conditionals that will be matched against the collection members.- Specified by:
setConditionalsin interfaceCollectionConditional<DefaultCollectionConditional>
-
setMatchIfEmpty
public void setMatchIfEmpty(boolean matchIfEmpty) Whether or not empty is considered a valid match.- Specified by:
setMatchIfEmptyin interfaceCollectionConditional<DefaultCollectionConditional>
-
equals
-
canEqual
-
hashCode
public int hashCode()
-