- All Known Implementing Classes:
ArrayBunch,HashedTripleBunch
public interface TripleBunch
A bunch of triples - a stripped-down set with specialized methods. A
bunch is expected to store triples that share some useful property
(such as having the same subject or predicate).
-
Method Summary
Modifier and TypeMethodDescriptionvoidAddtto the triples in this bunch.booleanAnswer true iff this TripleBunch contains a triple .equals tot.booleanAnswer true iff this TripleBunch contains a triple with .sameValueAs subject, predicate, and object.iterator()Answer an iterator over all the triples in this bunch.iterator(HashCommon.NotifyEmpty container) Answer an iterator over all the triples in this bunch.voidRemovetfrom the triples in this bunch.intsize()Answer the number of triples in this bunch.Answer a spliterator over all the triples in this bunch.
-
Method Details
-
contains
Answer true iff this TripleBunch contains a triple .equals tot. -
containsBySameValueAs
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). -
size
int size()Answer the number of triples in this bunch. -
add
Addtto the triples in this bunch. Iftis already a member, nothing happens. The bunch now .contains this triple. -
remove
Removetfrom the triples in this bunch. If it wasn't a member, nothing happens. The bunch no longer .contains this triple. -
iterator
ExtendedIterator<Triple> iterator()Answer an iterator over all the triples in this bunch. It is unwise to .remove from this iterator. (It may become illegal.) -
iterator
Answer an iterator over all the triples in this bunch. If use of .remove on this iterator empties the bunch, theemptiedmethod ofcontaineris invoked. -
spliterator
Spliterator<Triple> spliterator()Answer a spliterator over all the triples in this bunch.
-