- java.lang.Object
-
- com.aoapps.lang.validation.InvalidResult
-
- All Implemented Interfaces:
ValidationResult,Serializable
public final class InvalidResult extends Object implements ValidationResult
An invalid result with a user-friendly message.- Author:
- AO Industries, Inc.
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description InvalidResult(Resources resources, String key)InvalidResult(Resources resources, String key, Serializable... args)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Serializable[]getArgs()StringgetKey()ResourcesgetResources()booleanisValid()Gets the validation result.StringtoString()Gets a description of why invalid in the current thread's locale.
-
-
-
Constructor Detail
-
InvalidResult
public InvalidResult(Resources resources, String key, Serializable... args)
- Parameters:
args- No defensive copy
-
-
Method Detail
-
isValid
public boolean isValid()
Description copied from interface:ValidationResultGets the validation result.- Specified by:
isValidin interfaceValidationResult
-
toString
public String toString()
Description copied from interface:ValidationResultGets a description of why invalid in the current thread's locale. Should be simply "Valid" (or translation) for valid.- Specified by:
toStringin interfaceValidationResult- Overrides:
toStringin classObject
-
getResources
public Resources getResources()
-
getKey
public String getKey()
-
getArgs
public Serializable[] getArgs()
- Returns:
- No defensive copy.
-
-