public static final class NotEmptyConstraint.CollectionType extends NotEmptyConstraint<Collection<?>>
NotEmptyConstraint
implementation for
all JDK java.util.Collection
types.ConstraintFactory.collectionNotEmpty()
NotEmptyConstraint.ArrayType, NotEmptyConstraint.CollectionType, NotEmptyConstraint.MapType, NotEmptyConstraint.StringType
Modifier and Type | Field and Description |
---|---|
static NotEmptyConstraint.CollectionType |
DEFAULT
NotEmptyConstraint.CollectionType single instance. |
Modifier and Type | Method and Description |
---|---|
Class<?> |
getType()
Returns
java.util.Collection type. |
protected <T> boolean |
isEmpty(Collection<?> value,
ValidationContext<T> context)
Determines whether the specified collection is empty.
|
check, getMessageTemplate
validate
appendMessageArguments
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
appendMessageArguments
public static final NotEmptyConstraint.CollectionType DEFAULT
NotEmptyConstraint.CollectionType
single instance.public Class<?> getType()
java.util.Collection
type.java.util.Collection
type.protected <T> boolean isEmpty(Collection<?> value, ValidationContext<T> context)
isEmpty
in class NotEmptyConstraint<Collection<?>>
T
- The type of validated entity.value
- Collection to be checked for empty.context
- Validation context.true
if the specified collection is empty;
false
otherwise.Copyright © 2011–2020 FoxLabs. All rights reserved.