com.atlassian.jira.entity.remotelink
Class LazyJsonParser.ReadOnlyJsonNode

java.lang.Object
  extended by 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.


Method Summary
 boolean asBoolean()
           
 boolean asBoolean(boolean defaultValue)
           
 double asDouble()
           
 double asDouble(double defaultValue)
           
 int asInt()
           
 int asInt(int defaultValue)
           
 long asLong()
           
 long asLong(long defaultValue)
           
 String asText()
           
 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.
 org.codehaus.jackson.JsonToken asToken()
           
 boolean equals(Object o)
           
 LazyJsonParser.ReadOnlyJsonNode findParent(String fieldName)
           
 List<LazyJsonParser.ReadOnlyJsonNode> findParents(String fieldName)
           
 LazyJsonParser.ReadOnlyJsonNode findPath(String fieldName)
           
 LazyJsonParser.ReadOnlyJsonNode findValue(String fieldName)
           
 List<LazyJsonParser.ReadOnlyJsonNode> findValues(String fieldName)
           
 List<String> findValuesAsText(String fieldName)
           
 LazyJsonParser.ReadOnlyJsonNode get(int index)
           
 LazyJsonParser.ReadOnlyJsonNode get(String fieldName)
           
 BigInteger getBigIntegerValue()
           
 byte[] getBinaryValue()
           
 boolean getBooleanValue()
           
 BigDecimal getDecimalValue()
           
 double getDoubleValue()
           
 Iterator<LazyJsonParser.ReadOnlyJsonNode> getElements()
           
 Iterator<String> getFieldNames()
           
 int getIntValue()
           
 long getLongValue()
           
 org.codehaus.jackson.JsonParser.NumberType getNumberType()
           
 Number getNumberValue()
           
 String getTextValue()
           
 boolean has(int index)
           
 boolean has(String fieldName)
           
 int hashCode()
           
 boolean isArray()
           
 boolean isBigDecimal()
           
 boolean isBigInteger()
           
 boolean isBinary()
           
 boolean isBoolean()
           
 boolean isContainerNode()
           
 boolean isDouble()
           
 boolean isFloatingPointNumber()
           
 boolean isInt()
           
 boolean isIntegralNumber()
           
 boolean isLong()
           
 boolean isMissingNode()
           
 boolean isNull()
           
 boolean isNumber()
           
 boolean isObject()
           
 boolean isPojo()
           
 boolean isTextual()
           
 boolean isValueNode()
           
 Iterator<LazyJsonParser.ReadOnlyJsonNode> iterator()
           
 LazyJsonParser.ReadOnlyJsonNode path(int index)
           
 LazyJsonParser.ReadOnlyJsonNode path(String... fieldNames)
          This is like repeated calls to JsonNode.path(String)
 LazyJsonParser.ReadOnlyJsonNode path(String fieldName)
           
 int size()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Method Detail

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.