Interface ValueInputExtension

All Known Subinterfaces:
ValueInput
All Known Implementing Classes:
TagValueInput

public interface ValueInputExtension
Extension class for ValueInput
  • Method Details

    • self

      private ValueInput self()
    • keySet

      default Set<String> keySet()
      Returns the top-level keys of this object.
      Returns:
      the top-level keys of this object
    • readChild

      default void readChild(String key, ValueIOSerializable object)
      Reads the child object from the given key. The object will read the child ONLY if it's present.
      Parameters:
      key - the key to read the child from
      object - the object to read from the given key
    • rawChildOrEmpty

      default ValueInput rawChildOrEmpty(String key)
      Reads the child object from the given key, or provides an empty ValueInput if the child does not exist. This function behaves differently than ValueInput.childOrEmpty(String) in the case where the child exists (as reported by keySet()) but is empty. While ValueInput.childOrEmpty(String) will return an empty ValueInput from which nothing can ever be read with a codec, this function will instead return a a wrapper around the empty child, allowing values to be read with a codec, provided that the codec can deserialize empty map-like objects.
      If not implemented, defaults to ValueInput.childOrEmpty(String).
      Parameters:
      key - the key to read the child from
      Returns:
      the ValueInput of the child, or an empty input