com.iparelan.util.validation
Class NonNullNonEmptyStringValidationStrategy
java.lang.Object
com.iparelan.util.UtilObject
com.iparelan.util.validation.AbstractValidationStrategy<String>
com.iparelan.util.validation.NonNullNonEmptyStringValidationStrategy
- All Implemented Interfaces:
- ValidationStrategy<String>
@Immutable
@Copyright(value="Copyright © 2008, Iparelan Solutions, LLC. All rights reserved.")
public final class NonNullNonEmptyStringValidationStrategy
- extends AbstractValidationStrategy<String>
A validator that ensures a string is neither empty nor null.
| Fields inherited from interface com.iparelan.util.validation.ValidationStrategy |
BIG_DECIMAL_RANGE, BIG_INTEGER_RANGE, BYTE_RANGE, CALENDAR_RANGE, CHARACTER_RANGE, DATE_RANGE, DOUBLE_RANGE, FILE, FLOAT_RANGE, GREGORIAN_CALENDAR_RANGE, INTEGER, INTEGER_RANGE, LONG_RANGE, NON_EMPTY_STRING, NON_NULL_CLASS, NON_NULL_NON_EMPTY_STRING, NON_NULL_OBJECT, NON_NULL_STRING, SHORT_RANGE, SQL_DATE_RANGE, SQL_TIME_RANGE, SQL_TIMESTAMP_RANGE |
NonNullNonEmptyStringValidationStrategy
NonNullNonEmptyStringValidationStrategy()
- Creates a
NonNullNonEmptyStringValidationStrategy.
NonNullNonEmptyStringValidationStrategy
public NonNullNonEmptyStringValidationStrategy(String valueDescription)
- Creates a
NonNullNonEmptyStringValidationStrategy.
- Parameters:
valueDescription - The value description of this ValidationStrategy. May
not be null or the empty string.
- Throws:
IllegalArgumentException - Iff valueDescription is either null or the
empty string.
validate
public void validate(String string,
Object... context)
- Description copied from interface:
ValidationStrategy
- Validates the specified value.
- Parameters:
string - The value to be validated. May not be null.context - Any information required for, or related to, the validation of
unvalidated. The semantics (including whether null-ness is permitted) of this parameter are defined by the
implementations of this method. The first contextual argument
is, by convention, a String containing a description of
the value being validated.
getValidatorDescription
public String getValidatorDescription()
- Description copied from class:
AbstractValidationStrategy
- Produces the description of this
ValidationStrategy.
- Specified by:
getValidatorDescription in class AbstractValidationStrategy<String>
- Returns:
- The description of this
ValidationStrategy. Never
null.
Copyright © 2008 Iparelan Solutions, LLC. All rights reserved.