Interface ValueInputExtension
- All Known Subinterfaces:
ValueInput
- All Known Implementing Classes:
TagValueInput
public interface ValueInputExtension
Extension class for
ValueInput-
Method Summary
Modifier and TypeMethodDescriptionkeySet()Returns the top-level keys of this object.default ValueInputrawChildOrEmpty(String key) Reads thechildobject from the givenkey, or provides an emptyValueInputif the child does not exist.default voidreadChild(String key, ValueIOSerializable object) Reads thechildobject from the givenkey.private ValueInputself()
-
Method Details
-
self
-
keySet
Returns the top-level keys of this object.- Returns:
- the top-level keys of this object
-
readChild
Reads thechildobject from the givenkey. The object will read the child ONLY if it's present.- Parameters:
key- the key to read the child fromobject- the object to read from the given key
-
rawChildOrEmpty
Reads thechildobject from the givenkey, or provides an emptyValueInputif the child does not exist. This function behaves differently thanValueInput.childOrEmpty(String)in the case where the child exists (as reported bykeySet()) but is empty. WhileValueInput.childOrEmpty(String)will return an emptyValueInputfrom 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 toValueInput.childOrEmpty(String).- Parameters:
key- the key to read the child from- Returns:
- the
ValueInputof the child, or an empty input
-