Interface TreeTraverseAction<M extends Map<String,​Object>,​L extends List<Object>>

    • Method Detail

      • start

        boolean start​(M object)
        called before any traversal of the TreeTraverseAction tree starts
        Parameters:
        object - TODO
        Returns:
        true if traversal should start at all
      • traverseEntry

        boolean traverseEntry​(String fullPathToEntry,
                              Map.Entry<String,​Object> entry)
        called when a new entry is encountered and before any processing is performed on it
        Parameters:
        fullPathToEntry - TODO
        entry - TODO
        Returns:
        true if the entry should be processed
      • removeEntry

        boolean removeEntry​(String fullPathToEntry,
                            Map.Entry<String,​Object> entry)
        the last callback for each entry in an TreeTraverseAction map. if this method returns true the TreeTraverser removes the entry from the map. there is no further handling of the entry.
        Parameters:
        fullPathToEntry - TODO
        entry - TODO
        Returns:
        true if the entry and its subtree should be removed from the M tree
      • recurInto

        boolean recurInto​(String fullPathToSubtree,
                          M entryValue)
        called when a non-leaf entry is encountered inside an M object
        Parameters:
        fullPathToSubtree - TODO
        entryValue - TODO
        Returns:
        true if the non-leaf entry should be recursively traversed
      • recurInto

        boolean recurInto​(String fullPathToContainingList,
                          L entryValue)
        called when a non-leaf item is encountered inside an L object
        Parameters:
        fullPathToContainingList - TODO
        entryValue - TODO
        Returns:
        true if the non-leaf item should be recursively traversed
      • handleLeaf

        void handleLeaf​(String fullPathToEntry,
                        Map.Entry<String,​Object> entry)
        called for each leaf of an M map is encountered
        Parameters:
        fullPathToEntry - TODO
        entry - TODO
      • handleLeaf

        void handleLeaf​(String fullPathToContainingList,
                        int listIndex,
                        Object listItem)
        called for each leaf of an L list is encountered
        Parameters:
        fullPathToContainingList - - the item
        listIndex - - the ordered location of the item in the list
        listItem - -
      • end

        void end()
        called after the traversal ends, and just before the start(M) method exits
      • result

        Object result()
        holds the result of the traversal, as assigned by the action implementing this interface
        Returns:
        result