Interface JsonPrimitive


public interface JsonPrimitive
A wrapped primitive
Author:
Riccardo Balbo
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
     
    float
    Returns the wrapped primitive as a float
    int
    Returns the wrapped primitive as an int
    Returns the wrapped primitive as a generic number
    Returns the wrapped primitive as a string
    boolean
    Check if the wrapped primitive is a boolean
    boolean
    Check if the wrapped primitive is a number
    boolean
    Check if the wrapped primitive is a string
  • Method Details

    • getAsFloat

      float getAsFloat()
      Returns the wrapped primitive as a float
      Returns:
      the float value
    • getAsInt

      int getAsInt()
      Returns the wrapped primitive as an int
      Returns:
      the int value
    • getAsBoolean

      boolean getAsBoolean()
    • isNumber

      boolean isNumber()
      Check if the wrapped primitive is a number
      Returns:
      true if it is a number
    • isBoolean

      boolean isBoolean()
      Check if the wrapped primitive is a boolean
      Returns:
      true if it is a boolean
    • isString

      boolean isString()
      Check if the wrapped primitive is a string
      Returns:
      true if it is a string
    • getAsString

      String getAsString()
      Returns the wrapped primitive as a string
      Returns:
      the string value
    • getAsNumber

      Number getAsNumber()
      Returns the wrapped primitive as a generic number
      Returns:
      the number value