public interface TreeTraverseAction<M extends Map<String,Object>,L extends List<Object>>
M
tree
while traversing it. The order in which the callbacks are listed
below is the order in which they are called by the TreeTraverser
See package-info for more details
Modifier and Type | Method and Description |
---|---|
void |
end()
called after the traversal ends,
and just before the
#start(M) method exits |
void |
handleLeaf(String fullPathToContainingList,
int listIndex,
Object listItem)
called for each leaf of an
L list is encountered |
void |
handleLeaf(String fullPathToEntry,
Map.Entry<String,Object> entry)
called for each leaf of an
M map is encountered |
boolean |
recurInto(String fullPathToContainingList,
L entryValue)
called when a non-leaf item is encountered inside an object
|
boolean |
recurInto(String fullPathToSubtree,
M entryValue)
called when a non-leaf entry is encountered inside an object
|
boolean |
removeEntry(String fullPathToEntry,
Map.Entry<String,Object> entry)
the last callback for each entry in an
M map. |
Object |
result()
holds the result of the traversal,
as assigned by the action implementing this interface
|
boolean |
start(M object)
called before any traversal of the
M tree starts |
boolean |
traverseEntry(String fullPathToEntry,
Map.Entry<String,Object> entry)
called when a new entry is encountered and before any processing is performed on it
|
boolean start(M object)
M
tree startsboolean traverseEntry(String fullPathToEntry, Map.Entry<String,Object> entry)
boolean removeEntry(String fullPathToEntry, Map.Entry<String,Object> entry)
M
map. if this method returns true
the TreeTraverser
removes the entry from the map. there is no further
handling of the entry.M
treeboolean recurInto(String fullPathToSubtree, M entryValue)
boolean recurInto(String fullPathToContainingList, L entryValue)
void handleLeaf(String fullPathToEntry, Map.Entry<String,Object> entry)
M
map is encounteredvoid handleLeaf(String fullPathToContainingList, int listIndex, Object listItem)
L
list is encounteredlistItem
- - the itemlistIndex
- - the ordered location of the item in the listvoid end()
#start(M)
method exitsObject result()
Copyright © 2020 Chemouni Uriel. All rights reserved.