de.unkrig.commons.text.json
Class Json.NumbeR

java.lang.Object
  extended by de.unkrig.commons.text.json.Json.NumbeR
All Implemented Interfaces:
Json.Value
Enclosing class:
Json

public static class Json.NumbeR
extends java.lang.Object
implements Json.Value

Representation of a JSON 'number'.

Notice that the last letter of the class name is capitalized to avoid confusion with Number.


Field Summary
 java.lang.Number value
          The value of the JSON number; either a Long or a Double.
 
Constructor Summary
Json.NumbeR(java.lang.String text)
           
 
Method Summary
 void accept(Json.ValueVisitor visitor)
          Invokes the value type-specific 'visit...()' method of Json.ValueVisitor.
 boolean equals(java.lang.Object obj)
           
 int hashCode()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

value

public final java.lang.Number value
The value of the JSON number; either a Long or a Double.

Constructor Detail

Json.NumbeR

public Json.NumbeR(java.lang.String text)
Method Detail

accept

public void accept(Json.ValueVisitor visitor)
Description copied from interface: Json.Value
Invokes the value type-specific 'visit...()' method of Json.ValueVisitor.

Specified by:
accept in interface Json.Value

hashCode

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

equals

public boolean equals(@Nullable
                      java.lang.Object obj)
Overrides:
equals in class java.lang.Object