elemental.json.

Interface JsonArray

    • Method Summary

      All Methods
      Modifier and Type Method and Description
      <T extends JsonValue>
      T
      get(int index)

      Return the ith element of the array.

      JsonArray getArray(int index)

      Return the ith element of the array (uncoerced) as a JsonArray.

      boolean getBoolean(int index)

      Return the ith element of the array (uncoerced) as a boolean.

      double getNumber(int index)

      Return the ith element of the array (uncoerced) as a number.

      JsonObject getObject(int index)

      Return the ith element of the array (uncoerced) as a JsonObject If the type is not an object,, this can result in runtime errors.

      String getString(int index)

      Return the ith element of the array (uncoerced) as a String.

      int length()

      Length of the array.

      void remove(int index)

      Remove an element of the array at a particular index.

      void set(int index, boolean bool)

      Set the value at index to be a boolean value.

      void set(int index, double number)

      Set the value at index to be a number value.

      void set(int index, JsonValue value)

      Set the value at index to be a given value.

      void set(int index, String string)

      Set the value at index to be a String value.

    • Method Detail

      • get

        <T extends JsonValue> T get(int index)

        Return the ith element of the array.

      • getArray

        JsonArray getArray(int index)

        Return the ith element of the array (uncoerced) as a JsonArray. If the type is not an array, this can result in runtime errors.

      • getBoolean

        boolean getBoolean(int index)

        Return the ith element of the array (uncoerced) as a boolean. If the type is not a boolean, this can result in runtime errors.

      • getNumber

        double getNumber(int index)

        Return the ith element of the array (uncoerced) as a number. If the type is not a number, this can result in runtime errors.

      • getObject

        JsonObject getObject(int index)

        Return the ith element of the array (uncoerced) as a JsonObject If the type is not an object,, this can result in runtime errors.

      • getString

        String getString(int index)

        Return the ith element of the array (uncoerced) as a String. If the type is not a String, this can result in runtime errors.

      • length

        int length()

        Length of the array.

      • remove

        void remove(int index)

        Remove an element of the array at a particular index.

      • set

        void set(int index,
                 JsonValue value)

        Set the value at index to be a given value.

      • set

        void set(int index,
                 String string)

        Set the value at index to be a String value.

      • set

        void set(int index,
                 double number)

        Set the value at index to be a number value.

      • set

        void set(int index,
                 boolean bool)

        Set the value at index to be a boolean value.