void (HexViewer hexViewer, Visitor visitor) { hexViewer.getDataModel().ifPresent<caret>(bytes -> hexViewer.getCaret().ifPresent(caret -> { final ByteWalker walker = new ByteWalker(bytes); walker.walk(visitor, caret.getSelectionStart(), caret.getSelectionEnd()); }) ); }