public static final class RemoveNullElementsConstraint.CollectionType extends RemoveNullElementsConstraint<Collection<?>>
RemoveNullElementsConstraint
implementation for all JDK java.util.Collection
types.ConstraintFactory.collectionRemoveNullElements()
RemoveNullElementsConstraint.ArrayType, RemoveNullElementsConstraint.CollectionType
Modifier and Type | Field and Description |
---|---|
static RemoveNullElementsConstraint.CollectionType |
DEFAULT
RemoveNullElementsConstraint.CollectionType single
instance. |
Modifier and Type | Method and Description |
---|---|
Class<?> |
getType()
Returns
java.util.Collection type. |
<T> Collection<?> |
validate(Collection<?> collection,
ValidationContext<T> context)
Removes all
null elements from the specified collection. |
getMessageTemplate
appendMessageArguments
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
appendMessageArguments
public static final RemoveNullElementsConstraint.CollectionType DEFAULT
RemoveNullElementsConstraint.CollectionType
single
instance.public Class<?> getType()
java.util.Collection
type.java.util.Collection
type.public <T> Collection<?> validate(Collection<?> collection, ValidationContext<T> context)
null
elements from the specified collection.T
- The type of validated entity.collection
- Collection to be corrected.context
- Validation context.null
elements.Copyright © 2011–2020 FoxLabs. All rights reserved.