public class ValidatorResults extends Object implements Serializable
Modifier and Type | Field and Description |
---|---|
protected Map<String,ValidatorResult> |
hResults
Map of validation results.
|
Constructor and Description |
---|
ValidatorResults() |
Modifier and Type | Method and Description |
---|---|
void |
add(Field field,
String validatorName,
boolean result)
Add a the result of a validator action.
|
void |
add(Field field,
String validatorName,
boolean result,
Object value)
Add a the result of a validator action.
|
void |
clear()
Clear all results recorded by this object.
|
Set<String> |
getPropertyNames()
Return the set of property names for which at least one message has
been recorded.
|
Map<String,Object> |
getResultValueMap()
Get a
Map of any Object s returned from
validation routines. |
ValidatorResult |
getValidatorResult(String key)
Gets the
ValidatorResult associated
with the key passed in. |
boolean |
isEmpty()
Return
true if there are no messages recorded
in this collection, or false otherwise. |
void |
merge(ValidatorResults results)
Merge another ValidatorResults into mine.
|
protected Map<String,ValidatorResult> hResults
public void merge(ValidatorResults results)
results
- ValidatorResults to merge.public void add(Field field, String validatorName, boolean result)
field
- The field validated.validatorName
- The name of the validator.result
- The result of the validation.public void add(Field field, String validatorName, boolean result, Object value)
field
- The field validated.validatorName
- The name of the validator.result
- The result of the validation.value
- The value returned by the validator.public void clear()
public boolean isEmpty()
true
if there are no messages recorded
in this collection, or false
otherwise.public ValidatorResult getValidatorResult(String key)
ValidatorResult
associated
with the key passed in. The key the ValidatorResult
is stored under is the Field
's getKey method.key
- The key generated from Field
(this is often just
the field name).public Set<String> getPropertyNames()
Copyright © 2002–2017 The Apache Software Foundation. All rights reserved.