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.String
name
private JSONObject
rule
-
Constructor Summary
Constructors Modifier Constructor Description protected
Predicate(java.lang.String aName, JSONObject aRule)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
fail(JSONValue aValue)
protected void
fail(java.lang.String aMessage, JSONValue aValue)
java.lang.String
getName()
JSONObject
getRule()
-
-
-
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()
-
-