public final class DespaceConstraint extends CorrectConstraint<String>
CorrectConstraint
implementation that
removes all whitespaces from a string.Despace
,
ConstraintFactory.despace()
Modifier and Type | Field and Description |
---|---|
static DespaceConstraint |
DEFAULT
DespaceConstraint single instance. |
Modifier and Type | Method and Description |
---|---|
Class<?> |
getType()
Returns
java.lang.String type. |
<T> String |
validate(String value,
ValidationContext<T> context)
Removes all whitespaces from the specified string.
|
getMessageTemplate
appendMessageArguments
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
appendMessageArguments
public static final DespaceConstraint DEFAULT
DespaceConstraint
single instance.public Class<?> getType()
java.lang.String
type.java.lang.String
type.public <T> String validate(String value, ValidationContext<T> context)
T
- The type of validated entity.value
- Source string.context
- Validation context.Copyright © 2011–2020 FoxLabs. All rights reserved.