Interface PArray

All Known Implementing Classes:
PJoinedArray, PJsonArray, PYamlArray

public interface PArray
Array wrapper interface for Json and Yaml parsing.
  • Method Summary

    Modifier and Type
    Method
    Description
    get(int i)
    Get the object at the given index.
    getArray(int i)
    Get the element at the index as a json array.
    boolean
    getBool(int i)
    Get the element as a boolean.
    Gets the string representation of the path to the current element.
    double
    getDouble(int i)
    Get the element at the index as a double.
    float
    getFloat(int i)
    Get the element at the index as a float.
    int
    getInt(int i)
    Get the element at the index as an integer.
    long
    getLong(int i)
    Get the element at the index as a long.
    getObject(int i)
    Get the element at the index as a object.
    Gets the string representation of the path to the current element.
    getString(int i)
    Get the element at the index as a string.
    int
    Return the size of the array.
  • Method Details

    • size

      int size()
      Return the size of the array.
    • getObject

      PObject getObject(int i)
      Get the element at the index as a object.
      Parameters:
      i - the index of the object to access
    • getArray

      PArray getArray(int i)
      Get the element at the index as a json array.
      Parameters:
      i - the index of the element to access
    • getInt

      int getInt(int i)
      Get the element at the index as an integer.
      Parameters:
      i - the index of the element to access
    • getLong

      long getLong(int i)
      Get the element at the index as a long.
      Parameters:
      i - the index of the element to access
    • getFloat

      float getFloat(int i)
      Get the element at the index as a float.
      Parameters:
      i - the index of the element to access
    • getDouble

      double getDouble(int i)
      Get the element at the index as a double.
      Parameters:
      i - the index of the element to access
    • getString

      String getString(int i)
      Get the element at the index as a string.
      Parameters:
      i - the index of the element to access
    • getBool

      boolean getBool(int i)
      Get the element as a boolean.
      Parameters:
      i - the index of the element to access
    • getPath

      String getPath(String key)
      Gets the string representation of the path to the current element.
      Parameters:
      key - the leaf key
    • getCurrentPath

      String getCurrentPath()
      Gets the string representation of the path to the current element.
    • get

      Object get(int i)
      Get the object at the given index.
      Parameters:
      i - the index of the element to access