Interface JsonArrayBase<JVB extends JsonValueBase<JVB>>

Type Parameters:
JVB - the type of a JSON implementation wrapper
All Superinterfaces:
Iterable<JVB>, Jsonable, JsonValueBase<JVB>
All Known Subinterfaces:
JsonArrayCore<JVC>
All Known Implementing Classes:
GsonJsonArray, JacksonJsonArray, JakartaJsonArray, OrgJsonArray

public interface JsonArrayBase<JVB extends JsonValueBase<JVB>> extends Iterable<JVB>, JsonValueBase<JVB>
JsonArrayBase extends JsonValueBase and adds essential methods which should be included in any JSON array implementation.
Author:
Wei-Ming Wu
  • Method Details

    • get

      JVB get(int index)
      Returns a JSON value wrapper by given index.
      Parameters:
      index - a position in this JSON array
      Returns:
      a JSON value wrapper
    • size

      int size()
      Returns the size of this JSON array.
      Returns:
      an int
    • isEmpty

      default boolean isEmpty()
      Checks if this JSON array is empty.
      Returns:
      true if this JSON array is empty, false otherwise
    • toList

      default List<Object> toList()
      Converts this JSON array to a Java List.
      Returns:
      a List
    • stream

      default Stream<JVB> stream()
      Turns this JSON array into a Stream of JsonValueBase.
      Returns:
      a Stream