Skip to content

Commit

Permalink
Pointer to callback contract on example
Browse files Browse the repository at this point in the history
  • Loading branch information
raganhan committed Oct 19, 2018
1 parent a405b1a commit 27691e3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,15 +52,15 @@ Each time the `PathExtractor` encounters a value that matches a registered searc
callback passing the reader positioned at the current value. See `PathExtractorBuilder#withSearchPath` methods for more
information on the callback contract.

### Examples:
### Example:

```java
// Capture all matched values into a List
final List<Integer> list = new ArrayList<>();
final Function<IonReader, Integer> callback = (reader) -> {
list.add(reader.intValue());

return 0;
return 0; // See PathExtractorBuilder#withSearchPath javadoc for more details on the callback contract
};

final PathExtractor pathExtractor = PathExtractorBuilder.standard()
Expand Down

0 comments on commit 27691e3

Please sign in to comment.