Class Switch
- java.lang.Object
-
- com.sdicons.json.validator.impl.predicates.Predicate
-
- com.sdicons.json.validator.impl.predicates.Switch
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static class
Switch.Case
-
Field Summary
Fields Modifier and Type Field Description private java.lang.String
key
private java.util.List<Switch.Case>
rules
-
Constructor Summary
Constructors Constructor Description Switch(java.lang.String aName, JSONObject aRule, java.util.HashMap<java.lang.String,Validator> aRuleset)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
validate(JSONValue aValue)
Validate a JSONValue.
-
-
-
Field Detail
-
rules
private java.util.List<Switch.Case> rules
-
key
private java.lang.String key
-
-
Constructor Detail
-
Switch
public Switch(java.lang.String aName, JSONObject aRule, java.util.HashMap<java.lang.String,Validator> aRuleset) throws ValidationException
- Throws:
ValidationException
-
-
Method Detail
-
validate
public void validate(JSONValue aValue) throws ValidationException
Description copied from interface:Validator
Validate a JSONValue.- Parameters:
aValue
- The JSONValue that has to be validated.- Throws:
ValidationException
- If the validation fails.
-
-