Package jsonvalues.spec
Class JsTupleSpec
- java.lang.Object
-
- jsonvalues.spec.JsTupleSpec
-
- All Implemented Interfaces:
JsArraySpec
,JsSpec
public class JsTupleSpec extends java.lang.Object implements JsArraySpec
Represents a specification of every element of a Json array. It allows to define tuples and the schema of every of its elements.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
isRequired()
JsTupleSpec
nullable()
JsTupleSpec
optional()
JsSpecParser
parser()
java.util.Set<JsErrorPair>
test(JsArray array)
java.util.Set<JsErrorPair>
test(JsPath parentPath, JsValue value)
verify if the given value satisfy this spec.
-
-
-
Method Detail
-
isRequired
public boolean isRequired()
- Specified by:
isRequired
in interfaceJsSpec
- Returns:
- whether or not the key is optional.
-
nullable
public JsTupleSpec nullable()
-
optional
public JsTupleSpec optional()
-
parser
public JsSpecParser parser()
-
test
public java.util.Set<JsErrorPair> test(JsPath parentPath, JsValue value)
Description copied from interface:JsSpec
verify if the given value satisfy this spec.
-
test
public java.util.Set<JsErrorPair> test(JsArray array)
- Specified by:
test
in interfaceJsArraySpec
-
-