public class KeysPrintAction extends Object implements JSONTraverseAction
| Constructor and Description |
|---|
KeysPrintAction() |
| 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 pathToEntry,
Map.Entry<String,Object> entry)
called for each leaf of an
M map is encountered |
boolean |
recurInto(String pathToEntry,
net.minidev.json.JSONArray entryValue)
called when a non-leaf item is encountered inside an object
|
boolean |
recurInto(String pathToEntry,
net.minidev.json.JSONObject 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(net.minidev.json.JSONObject 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
|
public boolean start(net.minidev.json.JSONObject object)
TreeTraverseActionM tree startsstart in interface TreeTraverseAction<net.minidev.json.JSONObject,net.minidev.json.JSONArray>public boolean traverseEntry(String fullPathToEntry, Map.Entry<String,Object> entry)
TreeTraverseActiontraverseEntry in interface TreeTraverseAction<net.minidev.json.JSONObject,net.minidev.json.JSONArray>public boolean recurInto(String pathToEntry, net.minidev.json.JSONObject entryValue)
TreeTraverseActionrecurInto in interface TreeTraverseAction<net.minidev.json.JSONObject,net.minidev.json.JSONArray>public boolean recurInto(String pathToEntry, net.minidev.json.JSONArray entryValue)
TreeTraverseActionrecurInto in interface TreeTraverseAction<net.minidev.json.JSONObject,net.minidev.json.JSONArray>public void handleLeaf(String pathToEntry, Map.Entry<String,Object> entry)
TreeTraverseActionM map is encounteredhandleLeaf in interface TreeTraverseAction<net.minidev.json.JSONObject,net.minidev.json.JSONArray>public void handleLeaf(String fullPathToContainingList, int listIndex, Object listItem)
TreeTraverseActionL list is encounteredhandleLeaf in interface TreeTraverseAction<net.minidev.json.JSONObject,net.minidev.json.JSONArray>listIndex - - the ordered location of the item in the listlistItem - - the itempublic boolean removeEntry(String fullPathToEntry, Map.Entry<String,Object> entry)
TreeTraverseActionM map. if this method returns true
the TreeTraverser removes the entry from the map. there is no further
handling of the entry.removeEntry in interface TreeTraverseAction<net.minidev.json.JSONObject,net.minidev.json.JSONArray>M treepublic void end()
TreeTraverseAction#start(M) method exitsend in interface TreeTraverseAction<net.minidev.json.JSONObject,net.minidev.json.JSONArray>public Object result()
TreeTraverseActionresult in interface TreeTraverseAction<net.minidev.json.JSONObject,net.minidev.json.JSONArray>Copyright © 2017 Chemouni Uriel. All rights reserved.