Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public interface nodeProcessCallback {void run(Element item);}
- protected void processNodes(String tagName, nodeProcessCallback callback) {
- ....
- callback.run(item);
- ....
- }
- private void processTable(Element item){
- ....
- }
- public void execute() throws Exception {
- ....
- // send processTable as callback:
- processNodes("TABLE", (item) -> processTable(item));
- ....
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement