Vaadin 8: grid and dateprovider filter for date range

ListDataProvider dataProviderOBM= DataProvider.ofCollection(recordsOBM);;

Grid gridOBM = new Grid<>(ResultOBM.class);
gridOBM.setDataProvider(dataProviderOBM);

ui shows the grid through use of panel.

// works
dataProviderOBM.setFilterByValue(ResultOBM::getOppervlakte, 17);

// works
dataProviderOBM.setSortOrder(ResultOBM::getKlant, SortDirection.DESCENDING);

What I am looking for is a way to select a date (range) and only show that date range… I simply cannot find good example and the API documentation is as illustrating as a phonebook… it confirms the class and associated methods…

I am looking for something like;

dataProviderOBM.setFilter(ResultOBM::getDate, GREATER_THEN, 01-01-2017);

Anyone with suggestions? Much appreciate, Onno

The method setFilter takes SerializablePredicate as parameter. It means Java 8 style Lambda expression.

I.e. it could be like setFilter(myBean → myBean.getDate().isAfter(…));

Thats a simple and nice solution and example! Thanks Tatu. I got it working now.