org.springmodules.validation.util.condition.string
Class MinLengthStringCondition
java.lang.Object
org.springmodules.validation.util.condition.AbstractCondition
org.springmodules.validation.util.condition.TypeSpecificCondition
org.springmodules.validation.util.condition.NonNullAcceptingTypeSpecificCondition
org.springmodules.validation.util.condition.string.AbstractStringCondition
org.springmodules.validation.util.condition.string.MinLengthStringCondition
- All Implemented Interfaces:
- Condition
public class MinLengthStringCondition
- extends AbstractStringCondition
An AbstractStringCondition
implementation that checks whether the checked strings are not shorter than
a specific minimum length.
- Author:
- Uri Boness
Constructor Summary |
MinLengthStringCondition(int minLength)
Creates a new MinLengthStringCondition with a given minimum length that the checked strings will be checked against. |
Method Summary |
protected boolean |
checkString(String text)
Checks whether the given text is not shorter then the minimum length that is associated with this condition. |
int |
getMinLength()
Returns the minimum length that is associated with this condition. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MinLengthStringCondition
public MinLengthStringCondition(int minLength)
- Creates a new MinLengthStringCondition with a given minimum length that the checked strings will be checked against.
- Parameters:
minLength
- The minimum length that the checked strings will be checked against.
checkString
protected boolean checkString(String text)
- Checks whether the given text is not shorter then the minimum length that is associated with this condition.
- Specified by:
checkString
in class AbstractStringCondition
- Parameters:
text
- The checked text.
- Returns:
true
if the given text is not shorter then the minimum length that is associated with this
condition, false
otherwise.
getMinLength
public int getMinLength()
- Returns the minimum length that is associated with this condition.
- Returns:
- The minimum length that is associated with this condition.
Copyright © 2009. All Rights Reserved.