- 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 TypeMethodDescriptionvoid
Addt
to the triples in this bunch.boolean
Answer true iff this TripleBunch contains a triple .equals tot
.boolean
Answer 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.void
Removet
from the triples in this bunch.int
size()
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
Addt
to the triples in this bunch. Ift
is already a member, nothing happens. The bunch now .contains this triple. -
remove
Removet
from 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, theemptied
method ofcontainer
is invoked. -
spliterator
Spliterator<Triple> spliterator()Answer a spliterator over all the triples in this bunch.
-