argo.jdom
Class JsonField

java.lang.Object
  extended by argo.jdom.JsonField

public final class JsonField
extends java.lang.Object

A field in a JSON object. Immutable.


Constructor Summary
JsonField(JsonStringNode name, JsonNode value)
          Constructs an instance of {@code JsonField{@code with the given name and value.
 
Method Summary
 boolean equals(java.lang.Object o)
           
 JsonStringNode getName()
           
 JsonNode getValue()
           
 int hashCode()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

JsonField

public JsonField(JsonStringNode name,
                 JsonNode value)
Constructs an instance of {@code JsonField{@code with the given name and value.

Parameters:
name - a JSON string representing the key.
value - any JsonNode representing the value of the field.
Method Detail

getName

public JsonStringNode getName()
Returns:
a JSON string representing the key.

getValue

public JsonNode getValue()
Returns:
a JsonNode representing the value of the field.

equals

public boolean equals(java.lang.Object o)
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