예제 #1
0
 /**
  * Create a primitive using the specified Object. It must be an instance of {@link Number}, a Java
  * primitive type, or a String.
  *
  * @param primitive the value to create the primitive with.
  */
 JsonPrimitive(Object primitive) {
   setValue(primitive);
 }
예제 #2
0
 /**
  * Create a primitive containing a character. The character is turned into a one character String
  * since Json only supports String.
  *
  * @param c the value to create the primitive with.
  */
 public JsonPrimitive(Character c) {
   setValue(c);
 }
예제 #3
0
 /**
  * Create a primitive containing a {@link Number}.
  *
  * @param number the value to create the primitive with.
  */
 public JsonPrimitive(Number number) {
   setValue(number);
 }
예제 #4
0
 /**
  * Create a primitive containing a String value.
  *
  * @param string the value to create the primitive with.
  */
 public JsonPrimitive(String string) {
   setValue(string);
 }
예제 #5
0
 /**
  * Create a primitive containing a boolean value.
  *
  * @param bool the value to create the primitive with.
  */
 public JsonPrimitive(Boolean bool) {
   setValue(bool);
 }