Update sample to reflect API changes
Add predicate visitor interface