Class JsonPointer

java.lang.Object
io.vertx.mutiny.core.json.pointer.JsonPointer
All Implemented Interfaces:
MutinyDelegate

public class JsonPointer extends Object implements MutinyDelegate
Implementation of RFC6901 Json Pointers.

NOTE: This class has been automatically generated from the original non Mutiny-ified interface using Vert.x codegen.

  • Field Details

  • Constructor Details

    • JsonPointer

      public JsonPointer(io.vertx.core.json.pointer.JsonPointer delegate)
    • JsonPointer

      public JsonPointer(Object delegate)
  • Method Details

    • getDelegate

      public io.vertx.core.json.pointer.JsonPointer getDelegate()
      Specified by:
      getDelegate in interface MutinyDelegate
      Returns:
      the delegate used by this Mutiny object of generated type
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • isRootPointer

      public boolean isRootPointer()
      Returns:
    • isLocalPointer

      public boolean isLocalPointer()
      Returns:
    • isParent

      public boolean isParent(JsonPointer child)
      Parameters:
      child -
      Returns:
    • toString

      public String toString()
      Overrides:
      toString in class Object
      Returns:
    • append

      public JsonPointer append(String token)
      Parameters:
      token - the unescaped reference token
      Returns:
      a reference to this, so the API can be used fluently
    • append

      public JsonPointer append(int index)
      Parameters:
      index -
      Returns:
      a reference to this, so the API can be used fluently
    • append

      public JsonPointer append(List<String> tokens)
      Parameters:
      tokens - unescaped reference tokens
      Returns:
      a reference to this, so the API can be used fluently
    • append

      public JsonPointer append(JsonPointer pointer)
      Parameters:
      pointer - other pointer
      Returns:
      a reference to this, so the API can be used fluently
    • parent

      public JsonPointer parent()
      Returns:
      a reference to this, so the API can be used fluently
    • query

      public Object query(Object objectToQuery, JsonPointerIterator iterator)
      Parameters:
      objectToQuery - the object to query
      iterator - the json pointer iterator that provides the logic to access to the objectToQuery
      Returns:
      null if pointer points to not existing value, otherwise the requested value
    • queryOrDefault

      public Object queryOrDefault(Object objectToQuery, JsonPointerIterator iterator, Object defaultValue)
      Parameters:
      objectToQuery - the object to query
      iterator - the json pointer iterator that provides the logic to access to the objectToQuery
      defaultValue - default value if query result is null
      Returns:
      null if pointer points to not existing value, otherwise the requested value
    • queryJson

      public Object queryJson(Object jsonElement)
      Parameters:
      jsonElement - the json element to query
      Returns:
      null if pointer points to not existing value, otherwise the requested value
    • queryJsonOrDefault

      public Object queryJsonOrDefault(Object jsonElement, Object defaultValue)
      Parameters:
      jsonElement - the json element to query
      defaultValue - default value if query result is null
      Returns:
      null if pointer points to not existing value, otherwise the requested value
    • tracedQuery

      public List<Object> tracedQuery(Object objectToQuery, JsonPointerIterator iterator)
      Parameters:
      objectToQuery - the object to query
      iterator - the json pointer iterator that provides the logic to access to the objectToQuery
      Returns:
      the stream of walked elements
    • write

      public Object write(Object objectToWrite, JsonPointerIterator iterator, Object newElement, boolean createOnMissing)
      Parameters:
      objectToWrite - object to write
      iterator - the json pointer iterator that provides the logic to access to the objectToMutate
      newElement - object to insert
      createOnMissing - create objects when missing a object key or an array index
      Returns:
      a reference to objectToWrite if the write was completed, a reference to newElement if the pointer is a root pointer, null if the write failed
    • writeJson

      public Object writeJson(Object jsonElement, Object newElement)
      Parameters:
      jsonElement - json element to query and write
      newElement - json to insert
      Returns:
      a reference to json if the write was completed, a reference to newElement if the pointer is a root pointer, null if the write failed
    • writeJson

      public Object writeJson(Object jsonElement, Object newElement, boolean createOnMissing)
      Parameters:
      jsonElement - json to query and write
      newElement - json to insert
      createOnMissing - create JsonObject when missing a object key or an array index
      Returns:
      a reference to json if the write was completed, a reference to newElement if the pointer is a root pointer, null if the write failed
    • copy

      public JsonPointer copy()
      Returns:
      a copy of this pointer
    • create

      public static JsonPointer create()
      Returns:
      a new empty JsonPointer
    • from

      public static JsonPointer from(String pointer)
      Parameters:
      pointer - the string representing a pointer
      Returns:
      new instance of JsonPointer
    • toURI

      public URI toURI()
      Returns:
    • getURIWithoutFragment

      public URI getURIWithoutFragment()
      Returns:
    • fromURI

      public static JsonPointer fromURI(URI uri)
      Parameters:
      uri - uri representing a json pointer
      Returns:
      new instance of JsonPointer
    • newInstance

      public static JsonPointer newInstance(io.vertx.core.json.pointer.JsonPointer arg)