/** Overridden in Drop/Keep as appropriate. Answer true if the object is to be kept in the output, false if it is to be dropped. */ protected boolean accept( T x ) { return f.accept( x ); }
@Override public boolean accept(Triple t) { return !filter.accept(t) ; }
@Override protected boolean accept( T x ) { return f.accept( x ); } }
@Override protected boolean accept( T x ) { return !f.accept( x ); } }
/** * Creates and adds the triple to the given list if the triple passes * the filter. * * @param triples List to be added * @param s subject of the triple * @param p predicate of the triple * @param o object of the triple */ private void addTriple(List<Triple> triples, Node s, Node p, Node o) { Triple triple = Triple.create( s, p, o ); if( !filter.accept( triple ) ) triples.add( triple ); }