Class Value.ArrayValue

    • Constructor Detail

      • ArrayValue

        public ArrayValue()
    • Method Detail

      • 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
      • entryCount

        public int entryCount()
        Description copied from interface: Inspector
        Get the number of entries in an ARRAY (always returns 0 for non-arrays)
        Specified by:
        entryCount in interface Inspector
        Overrides:
        entryCount in class Value
      • entry

        public Inspector entry​(int idx)
        Description copied from interface: Inspector
        Access an array entry. If the current Inspector doesn't connect to an array value, or the given array index is out of bounds, the returned Inspector will be invalid.
        Specified by:
        entry in interface Inspector
        Overrides:
        entry in class Value
        Parameters:
        idx - array index
        Returns:
        a new Inspector for the entry value
      • traverse

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

        public java.lang.Iterable<Inspector> entries()
        Description copied from interface: Inspector
        Convert an array to an iterable list. Other types will just return an empty list.
        Specified by:
        entries in interface Inspector
        Overrides:
        entries in class Value