Interface Splittable


public interface Splittable
This interface provides an abstraction around the underlying data model (JavaScriptObject, or JSON) used to encode an AutoBeanCodex payload.
  • Field Details

    • NULL

      static final Splittable NULL
      A value that represents null.
  • Method Details

    • asBoolean

      boolean asBoolean()
      Returns a boolean representation of the data.
    • asNumber

      double asNumber()
      Returns a numeric representation of the data.
    • assign

      void assign(Splittable parent, int index)
      Assign the splittable to the specified index of the parent object.
    • assign

      void assign(Splittable parent, String propertyName)
      Assign the splittable to the named property of the parent object.
    • asString

      String asString()
      Returns a string representation of the data.
    • deepCopy

      Splittable deepCopy()
      Clones the Splittable, ignoring cycles and tags.
    • get

      Splittable get(int index)
      Returns the nth element of a list.
    • get

      Splittable get(String key)
      Returns the named property.
    • getPayload

      String getPayload()
      Returns a wire-format representation of the data.
    • getPropertyKeys

      List<String> getPropertyKeys()
      Returns all keys available in the Splittable. This method may be expensive to compute.
    • getReified

      Object getReified(String key)
      Returns a value previously set with setReified(String, Object).
    • isBoolean

      boolean isBoolean()
      Returns true if the value of the Splittable is a boolean.
    • isIndexed

      boolean isIndexed()
      Returns true if size() and get(int) can be expected to return meaningful values.
    • isKeyed

      boolean isKeyed()
      Returns true if getPropertyKeys() and get(String) can be expected to return meaningful values.
    • isNull

      boolean isNull(int index)
      Indicates if the nth element of a list is null or undefined.
    • isNull

      boolean isNull(String key)
      Indicates if the named property is null or undefined.
    • isNumber

      boolean isNumber()
      Returns true if the value of the Splittable is numeric.
    • isReified

      boolean isReified(String key)
      Returns true if setReified(String, Object) has been called with the given key.
    • isString

      boolean isString()
      Returns true if asString() can be expected to return a meaningful value.
    • isUndefined

      boolean isUndefined(String key)
      Returns true if the value of the key is undefined.
    • removeReified

      void removeReified(String key)
      Removes a tag value from the Splittable.
      Parameters:
      key - the key for the value to be removed
    • setReified

      void setReified(String key, Object object)
      Associates a tag value with the Splittable.
    • setSize

      void setSize(int i)
      Resets the length of an indexed Splittable.
    • size

      int size()
      Returns the size of an indexed Splittable.