org.mule.common.metadata.parser.json
Class JSONArrayType
java.lang.Object
org.mule.common.metadata.parser.json.AbstractType
org.mule.common.metadata.parser.json.JSONArrayType
- All Implemented Interfaces:
- JSONType
public class JSONArrayType
- extends AbstractType
JSONArrayType represents a schema type for a JSON array value.
The array type is characterized by the type of its items -- future versions may support optional cardinality constraints on the array as well.
- Author:
- Timothy Danford
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JSONArrayType
public JSONArrayType(SchemaEnv schemaEnv,
org.json.JSONObject schema)
throws SchemaException
- Throws:
SchemaException
getItemsType
public JSONType getItemsType()
contains
public boolean contains(Object obj)
- Description copied from interface:
JSONType
- The central method of JSONType; the type encompasses the values for which contains returns true.
- Specified by:
contains in interface JSONType- Specified by:
contains in class AbstractType
- Returns:
- trueif the given Object satisfies the type, false otherwise.
explain
public String explain(Object obj)
- Description copied from interface:
JSONType
- Returns a non-null String explanation, suitable for display to a user, explaining why the given object fails to conform to the JSONType's contains method.
- Specified by:
explain in interface JSONType- Overrides:
explain in class AbstractType
- Returns:
- an explanatory string if contains(arg) is false, or null if contains(arg) is true.
isJSONPrimitive
public boolean isJSONPrimitive()
isJSONArray
public boolean isJSONArray()
isJSONObject
public boolean isJSONObject()
isJSONPointer
public boolean isJSONPointer()
Copyright © 2015 MuleSoft, Inc.. All rights reserved.