| com.hp.hpl.jena.mem.TripleBunch
All known Subclasses: com.hp.hpl.jena.mem.ArrayBunch, com.hp.hpl.jena.mem.HashedTripleBunch, com.hp.hpl.jena.mem.SetBunch,
TripleBunch | public interface TripleBunch (Code) | | A bunch of triples - a strippled-down set with specialised methods. A
bunch is expected tos tore triples that share some useful property
(such as having the same subject or predicate).
author: kers |
Method Summary | |
abstract public void | add(Triple t) Add t to the triples in this bunch. | abstract public void | app(Domain d, StageElement next, MatchOrBind s) For every triple t in this bunch that matches s, invoke
next.run(d) . | abstract public boolean | contains(Triple t) Answer true iff this TripleBunch contains a triple .equals to t . | abstract public boolean | containsBySameValueAs(Triple t) Answer true iff this TripleBunch contains a triple with .sameValueAs
subject, predicate, and object. | abstract public ExtendedIterator | iterator() Answer an iterator over all the triples in this bunch. | abstract public ExtendedIterator | iterator(HashCommon.NotifyEmpty container) Answer an iterator over all the triples in this bunch. | abstract public void | remove(Triple t) Remove t from the triples in this bunch. | abstract public int | size() Answer the number of triples in this bunch. |
add | abstract public void add(Triple t)(Code) | | Add t to the triples in this bunch. If t
is already a member, nothing happens. The bunch now .contains this
triple.
|
app | abstract public void app(Domain d, StageElement next, MatchOrBind s)(Code) | | For every triple t in this bunch that matches s, invoke
next.run(d) . d may have been
side-effected by the match. app is the main reason
that TripleBunch exists at all: it's a way to iterate as fast as possible
over the triples in the context of a graph query, without having to
construct an Iterator object which has to maintain the iteration state
in instance variables.
|
contains | abstract public boolean contains(Triple t)(Code) | | Answer true iff this TripleBunch contains a triple .equals to t .
|
containsBySameValueAs | abstract public boolean containsBySameValueAs(Triple t)(Code) | | Answer true iff this TripleBunch contains a triple with .sameValueAs
subject, predicate, and object. (Typically this only matters for the
object. For example, integer literals with different numbers of leading
zeroes can be .sameValueAs but not .equals).
|
iterator | abstract public ExtendedIterator iterator()(Code) | | Answer an iterator over all the triples in this bunch. It is unwise to
.remove from this iterator. (It may become illegal.)
|
iterator | abstract public ExtendedIterator iterator(HashCommon.NotifyEmpty container)(Code) | | Answer an iterator over all the triples in this bunch. If use of .remove on
this iterator empties the bunch, the emptied method of
container is invoked.
|
remove | abstract public void remove(Triple t)(Code) | | Remove t from the triples in this bunch. If it wasn't
a member, nothing happens. The bunch no longer .contains this triple.
|
size | abstract public int size()(Code) | | Answer the number of triples in this bunch.
|
|
|