@Override public boolean containsBySameValueAs( Triple t ) { int i = size; while (i > 0) if (t.matches( elements[--i])) return true; return false; }
/** The object is wanted. @param t The object to accept or reject. Must be a Triple @return true if the object is wanted. */ @Override public boolean accept( Triple t ) { return tMatch.matches( t ); } }
/** Add the triple <code>t</code> to this list if it is matched by the pattern. */ @Override public void add( Triple t ) { if (match.matches( t )) triples.add( t ); }
protected boolean slowContains( Triple t ) { Iterator<Triple> it = elements.iterator(); while (it.hasNext()) if (t.matches( it.next() )) return true; return false; }
protected int findSlotBySameValueAs( Triple key ) { int index = initialIndexFor( key ); while (true) { Object current = keys[index]; if (current == null) return index; if (key.matches( (Triple) current )) return ~index; if (--index < 0) index += capacity; } }
protected boolean slowContains( Triple t ) { TripleBunch s = bunchMap.get( getIndexField( t ) ); if (s == null) return false; else { Iterator<Triple> it = s.iterator(); while (it.hasNext()) if (t.matches( it.next() )) return true; return false; } }
@Override protected ExtendedIterator<Triple> graphBaseFind(TripleMatch m) { List<Triple> results = new ArrayList<Triple>() ; for ( Triple t : triples ) if ( t.matches(m.getMatchSubject(), m.getMatchPredicate(), m.getMatchObject()) ) results.add(t) ; return WrappedIterator.create(results.iterator()) ; } }
private boolean matches(Triple t, Node s, Node p, Node o) { s = nullAsAny(s) ; p = nullAsAny(p) ; o = nullAsAny(o) ; return t.matches(s,p,o) ; }