/** Accept statements with predicate <code>pred</code> */ public PredicatesFilter(Property pred) { m_preds = new HashSet<Property>(); m_preds.add(pred); }
@Override public boolean accept(Statement s) { return m_preds.contains(s.getPredicate()); }
/** Accept statements with any predicate from <code>preds</code> */ public PredicatesFilter(Property[] preds) { m_preds = new HashSet<Property>(); for (int i = 0; i < preds.length; i++) { m_preds.add(preds[i]); } }