Class JsonInstance
- java.lang.Object
-
- io.openapiprocessor.jsonschema.schema.JsonInstance
-
public class JsonInstance extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description JsonInstance(@Nullable java.lang.Object value)JsonInstance(JsonPointer location, @Nullable java.lang.Object value)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description @Nullable java.util.Collection<java.lang.Object>asCollection()@Nullable java.lang.NumberasNumber()@Nullable java.util.Map<java.lang.String,java.lang.Object>asObject()@Nullable java.lang.StringasString()intgetArraySize()JsonPointergetLocation()java.lang.StringgetPath()JsonInstancegetPropertyName(java.lang.String propertyName)@Nullable java.lang.ObjectgetRawValue()JsonInstancegetValue(int idx)JsonInstancegetValue(java.lang.String property)booleanisArray()booleanisEqual(JsonInstance other)booleanisNull()booleanisNumber()booleanisObject()booleanisString()java.lang.StringtoString()
-
-
-
Constructor Detail
-
JsonInstance
public JsonInstance(@Nullable java.lang.Object value)
-
JsonInstance
public JsonInstance(JsonPointer location, @Nullable java.lang.Object value)
-
-
Method Detail
-
getLocation
public JsonPointer getLocation()
-
getPath
public java.lang.String getPath()
-
getRawValue
public @Nullable java.lang.Object getRawValue()
-
getPropertyName
public JsonInstance getPropertyName(java.lang.String propertyName)
-
getValue
public JsonInstance getValue(java.lang.String property)
-
getValue
public JsonInstance getValue(int idx)
-
getArraySize
public int getArraySize()
-
asObject
public @Nullable java.util.Map<java.lang.String,java.lang.Object> asObject()
-
asCollection
public @Nullable java.util.Collection<java.lang.Object> asCollection()
-
asString
public @Nullable java.lang.String asString()
-
asNumber
public @Nullable java.lang.Number asNumber()
-
isNull
public boolean isNull()
-
isString
@EnsuresNonNullIf(expression="value", result=true) public boolean isString()
-
isNumber
@EnsuresNonNullIf(expression="value", result=true) public boolean isNumber()
-
isObject
@EnsuresNonNullIf(expression="value", result=true) public boolean isObject()
-
isArray
@EnsuresNonNullIf(expression="value", result=true) public boolean isArray()
-
isEqual
public boolean isEqual(JsonInstance other)
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-