Class Value.ObjectValue

java.lang.Object
com.yahoo.data.access.simple.Value
com.yahoo.data.access.simple.Value.ObjectValue
All Implemented Interfaces:
Inspectable, Inspector
Enclosing class:
Value

public static class Value.ObjectValue extends Value
  • Constructor Details

    • ObjectValue

      public ObjectValue()
  • Method Details

    • valid

      public boolean valid()
      Description copied from interface: Inspector
      Check if the inspector is valid. If you try to access a field or array entry that does not exist, you will get an invalid Inspector returned.
      Specified by:
      valid in interface Inspector
      Overrides:
      valid in class Value
    • type

      public Type type()
      Description copied from interface: Inspector
      Get the type of an inspector
      Specified by:
      type in interface Inspector
      Overrides:
      type in class Value
    • fieldCount

      public int fieldCount()
      Description copied from interface: Inspector
      Get the number of fields in an OBJECT (always returns 0 for non-objects)
      Specified by:
      fieldCount in interface Inspector
      Overrides:
      fieldCount in class Value
    • field

      public Inspector field(String name)
      Description copied from interface: Inspector
      Access an field in an object. If the current Inspector doesn't connect to an object value, or the object value does not contain a field with the given symbol name, the returned Inspector will be invalid.
      Specified by:
      field in interface Inspector
      Overrides:
      field in class Value
      Parameters:
      name - symbol name
      Returns:
      a new Inspector for the field value
    • traverse

      public void traverse(ObjectTraverser ot)
      Description copied from interface: Inspector
      Traverse an object value, performing callbacks for each field. If the current Inspector is connected to an object value, perform callbacks to the given traverser for each field contained in the object. Otherwise a no-op.
      Specified by:
      traverse in interface Inspector
      Overrides:
      traverse in class Value
      Parameters:
      ot - traverser callback object
    • fields

      public Iterable<Map.Entry<String,Inspector>> fields()
      Description copied from interface: Inspector
      Convert an object to an iterable list of (name, value) pairs. Other types will just return an empty list.
      Specified by:
      fields in interface Inspector
      Overrides:
      fields in class Value
    • put

      public Value.ObjectValue put(String name, Inspector v)
    • put

      public Value.ObjectValue put(String name, String value)
    • put

      public Value.ObjectValue put(String name, long value)
    • put

      public Value.ObjectValue put(String name, int value)
    • put

      public Value.ObjectValue put(String name, double value)