argo.jdom
Class JsonStringNode

java.lang.Object
  extended by argo.jdom.JsonNode
      extended by argo.jdom.JsonStringNode
All Implemented Interfaces:
JsonNodeBuilder<JsonStringNode>, java.lang.Comparable<JsonStringNode>

public final class JsonStringNode
extends JsonNode
implements java.lang.Comparable<JsonStringNode>, JsonNodeBuilder<JsonStringNode>

JsonNode that explicitly represents a JSON String.


Method Summary
 JsonStringNode build()
          Generates an instance of T, as specified by calls to any other methods provided by implementations of JsonNodeBuilder.
 int compareTo(JsonStringNode that)
           
 boolean equals(java.lang.Object that)
           
 java.util.List<JsonNode> getElements()
           
 java.util.List<JsonField> getFieldList()
          Gets the fields associated with this node as a list of JsonFields.
 java.util.Map<JsonStringNode,JsonNode> getFields()
          Gets the fields associated with this node as a map of name to value.
 java.lang.String getText()
           
 JsonNodeType getType()
           
 boolean hasElements()
           
 boolean hasFields()
           
 int hashCode()
           
 boolean hasText()
           
 java.lang.String toString()
           
 
Methods inherited from class argo.jdom.JsonNode
getArrayNode, getBooleanValue, getNode, getNullableArrayNode, getNullableBooleanValue, getNullableNumberValue, getNullableObjectNode, getNullableStringValue, getNullNode, getNumberValue, getObjectNode, getRootNode, getStringValue, isArrayNode, isBooleanValue, isNode, isNullableArrayNode, isNullableBooleanValue, isNullableNumberNode, isNullableObjectNode, isNullableStringValue, isNullNode, isNumberValue, isObjectNode, isRootNode, isStringValue
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Method Detail

getType

public JsonNodeType getType()
Specified by:
getType in class JsonNode

hasText

public boolean hasText()
Specified by:
hasText in class JsonNode

getText

public java.lang.String getText()
Specified by:
getText in class JsonNode
Returns:
the text associated with this node

hasFields

public boolean hasFields()
Specified by:
hasFields in class JsonNode

getFields

public java.util.Map<JsonStringNode,JsonNode> getFields()
Description copied from class: JsonNode
Gets the fields associated with this node as a map of name to value. Note that JSON permits duplicated keys in an object, though in practice this is rare, and in this case, this method will return a map containing a single entry of each unique key.

Specified by:
getFields in class JsonNode
Returns:
the fields associated with this node

getFieldList

public java.util.List<JsonField> getFieldList()
Description copied from class: JsonNode
Gets the fields associated with this node as a list of JsonFields. This method allows the retrieval of all fields in an object even when the fields have duplicate keys. This method also preserves the order of the fields.

Specified by:
getFieldList in class JsonNode
Returns:
the fields associated with this node

hasElements

public boolean hasElements()
Specified by:
hasElements in class JsonNode

getElements

public java.util.List<JsonNode> getElements()
Specified by:
getElements in class JsonNode
Returns:
the elements associated with this node

equals

public boolean equals(java.lang.Object that)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

compareTo

public int compareTo(JsonStringNode that)
Specified by:
compareTo in interface java.lang.Comparable<JsonStringNode>

build

public JsonStringNode build()
Description copied from interface: JsonNodeBuilder
Generates an instance of T, as specified by calls to any other methods provided by implementations of JsonNodeBuilder.

Specified by:
build in interface JsonNodeBuilder<JsonStringNode>
Returns:
an instance of T.