com.atlassian.jira.entity.remotelink
Class LazyJsonParser.ReadOnlyJsonNode
java.lang.Object
com.atlassian.jira.entity.remotelink.LazyJsonParser.ReadOnlyJsonNode
- All Implemented Interfaces:
- Iterable<LazyJsonParser.ReadOnlyJsonNode>
- Enclosing class:
- LazyJsonParser
public static class LazyJsonParser.ReadOnlyJsonNode
- extends Object
- implements Iterable<LazyJsonParser.ReadOnlyJsonNode>
Provides the same functionality that a true JsonNode
would, except that
the nodes may not be cast to their original mutable types, thereby protecting the
JSON data against modification. To simplify this and prevent any confusion or the
need to implement any deprecated or irrelevant methods, this class intentionally
does not extend JsonNode
itself.
isValueNode
public boolean isValueNode()
isContainerNode
public boolean isContainerNode()
isMissingNode
public boolean isMissingNode()
isArray
public boolean isArray()
isObject
public boolean isObject()
isPojo
public boolean isPojo()
isNumber
public boolean isNumber()
isIntegralNumber
public boolean isIntegralNumber()
isFloatingPointNumber
public boolean isFloatingPointNumber()
isInt
public boolean isInt()
isLong
public boolean isLong()
isDouble
public boolean isDouble()
isBigDecimal
public boolean isBigDecimal()
isBigInteger
public boolean isBigInteger()
isTextual
public boolean isTextual()
isBoolean
public boolean isBoolean()
isNull
public boolean isNull()
isBinary
public boolean isBinary()
asToken
public org.codehaus.jackson.JsonToken asToken()
getNumberType
public org.codehaus.jackson.JsonParser.NumberType getNumberType()
getTextValue
public String getTextValue()
getBinaryValue
public byte[] getBinaryValue()
throws IOException
- Throws:
IOException
getBooleanValue
public boolean getBooleanValue()
getNumberValue
public Number getNumberValue()
getIntValue
public int getIntValue()
getLongValue
public long getLongValue()
getDoubleValue
public double getDoubleValue()
getDecimalValue
public BigDecimal getDecimalValue()
getBigIntegerValue
public BigInteger getBigIntegerValue()
get
public LazyJsonParser.ReadOnlyJsonNode get(int index)
get
public LazyJsonParser.ReadOnlyJsonNode get(String fieldName)
asText
public String asText()
asTextOrNull
public String asTextOrNull()
- This is like
JsonNode.asText()
, but it will only return a value for text nodes
instead of attempting to coerce other value nodes, for which it will always return
null
.
asInt
public int asInt()
asInt
public int asInt(int defaultValue)
asLong
public long asLong()
asLong
public long asLong(long defaultValue)
asDouble
public double asDouble()
asDouble
public double asDouble(double defaultValue)
asBoolean
public boolean asBoolean()
asBoolean
public boolean asBoolean(boolean defaultValue)
has
public boolean has(String fieldName)
has
public boolean has(int index)
findValue
public LazyJsonParser.ReadOnlyJsonNode findValue(String fieldName)
findValues
public List<LazyJsonParser.ReadOnlyJsonNode> findValues(String fieldName)
findValuesAsText
public List<String> findValuesAsText(String fieldName)
findPath
public LazyJsonParser.ReadOnlyJsonNode findPath(String fieldName)
findParent
public LazyJsonParser.ReadOnlyJsonNode findParent(String fieldName)
findParents
public List<LazyJsonParser.ReadOnlyJsonNode> findParents(String fieldName)
size
public int size()
iterator
public Iterator<LazyJsonParser.ReadOnlyJsonNode> iterator()
- Specified by:
iterator
in interface Iterable<LazyJsonParser.ReadOnlyJsonNode>
getElements
public Iterator<LazyJsonParser.ReadOnlyJsonNode> getElements()
getFieldNames
public Iterator<String> getFieldNames()
path
public LazyJsonParser.ReadOnlyJsonNode path(String... fieldNames)
- This is like repeated calls to
JsonNode.path(String)
- Parameters:
fieldNames
- the field names to traverse
path
public LazyJsonParser.ReadOnlyJsonNode path(String fieldName)
path
public LazyJsonParser.ReadOnlyJsonNode path(int index)
equals
public boolean equals(Object o)
- Overrides:
equals
in class Object
hashCode
public int hashCode()
- Overrides:
hashCode
in class Object
toString
public String toString()
- Overrides:
toString
in class Object
Copyright © 2002-2014 Atlassian. All Rights Reserved.