About Question enthuware.ocpjp.v7.2.1268 :
Posted: Sat Sep 28, 2013 11:46 am
Hi,
Erm, seems like dodgy wordage is being used here:
Cheers.
Erm, seems like dodgy wordage is being used here:
Whereas (http://docs.oracle.com/javase/tutorial/ ... ta-further):You can supply an instance of only one Predicate class to set a condition for a FilteredRowSet.
It was because I had read this that I was confused by the answers...choosing the only other one that I didn't *know* to be false (the silly Assertion interface one..very silly and very wrong). Maybe the "correct" answer could do with a subtle rewording? Maybe you mean if you have 2 different implementations of Predicate (class X implements Predicate{...}, class Y implements Predicate{...}, you can only use one of them in any given FilteredRowSet object, even though you can apply multiple instances of it? Is that what you mean?You set multiple filters serially. The first time you call the method setFilter and pass it a Predicate object, you have applied the filtering criteria in that filter. After calling the method next on each row, which makes visible only those rows that satisfy the filter, you can call setFilter again, passing it a different Predicate object. Even though only one filter is set at a time, the effect is that both filters apply cumulatively.
Cheers.