|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.cafesoft.core.data.StandardValidatorMap
public class StandardValidatorMap
StandardValidatorMap implements a ValidatorMap,
which associates a key with a Validator instance suitable for
validating a value assigned to the specified key.
| Constructor Summary | |
|---|---|
StandardValidatorMap(int size,
boolean caseSensitiveKeys)
Create a new StandardValidatorMap instance. |
|
| Method Summary | |
|---|---|
void |
add(String key,
Validator validator)
Add a Validator for the specified key. |
boolean |
containsKey(String key)
Returns true if the ValidtorMap contains the specified key. |
void |
destroy()
Destroy the ValidatorMap. |
String |
toString()
Return a String representation of the StandardValidatorMap. |
boolean |
validate(String key,
Object value,
boolean validIfNoValidator)
Validate the value associated with a given key. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public StandardValidatorMap(int size,
boolean caseSensitiveKeys)
size - the initial size of the Map.caseSensitiveKeys - flag indicating whether keys are case sensitive
(true) or not (false)| Method Detail |
|---|
public void add(String key,
Validator validator)
add in interface ValidatorMapkey - the key.validator - the Validator.
public boolean validate(String key,
Object value,
boolean validIfNoValidator)
validate in interface ValidatorMapkey - the key associated with the value to be validated.value - the value to be validated.validIfNoValidator - a boolean value indicating whether
validation should succeed if no validator is defined for a
the specified key. If true and a Validator is not associated
with the key, then return true.
public boolean containsKey(String key)
containsKey in interface ValidatorMapkey - the key.
public void destroy()
destroy in interface ValidatorMappublic String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||