Class Predicate
- java.lang.Object
-
- com.sdicons.json.validator.impl.predicates.Predicate
-
- All Implemented Interfaces:
Validator
- Direct Known Subclasses:
And,Array,Bool,Complex,Content,CustomPredicate,CustomValidator,Decimal,Enumeration,False,Int,Length,Let,Not,Nr,Null,Object,Or,Properties,Range,Ref,Regexp,Simple,Str,Switch,True
public abstract class Predicate extends java.lang.Object implements Validator
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.Stringnameprivate JSONObjectrule
-
Constructor Summary
Constructors Modifier Constructor Description protectedPredicate(java.lang.String aName, JSONObject aRule)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidfail(JSONValue aValue)protected voidfail(java.lang.String aMessage, JSONValue aValue)java.lang.StringgetName()JSONObjectgetRule()
-
-
-
Field Detail
-
name
private java.lang.String name
-
rule
private JSONObject rule
-
-
Constructor Detail
-
Predicate
protected Predicate(java.lang.String aName, JSONObject aRule)
-
-
Method Detail
-
fail
protected void fail(JSONValue aValue) throws ValidationException
- Throws:
ValidationException
-
fail
protected void fail(java.lang.String aMessage, JSONValue aValue) throws ValidationException- Throws:
ValidationException
-
getName
public java.lang.String getName()
-
getRule
public JSONObject getRule()
-
-