All the posts and topics that contain only an error report will be moved here after the error is corrected. This is to ensure that when users view a question in ETS Viewer, the "Discuss" button will not indicate the presence of a discussion that adds no value to the question.
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.
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 are right. The wording it not good. It should say something like, "You can supply an instance of only one Predicate class at a time to set a condition for a FilteredRowSet." because there is no method that takes multiple predicate instances at the same time.
void setFilter(Predicate p)
throws SQLException
Applies the given Predicate object to this FilteredRowSet object. The filter applies controls both to inbound and outbound views, constraining which rows are visible and which rows can be manipulated.
A new Predicate object may be set at any time. This has the effect of changing constraints on the RowSet object's data. In addition, modifying the filter at runtime presents issues whereby multiple components may be operating on one FilteredRowSet object. Application developers must take responsibility for managing multiple handles to FilteredRowSet objects when their underling Predicate objects change.