Constructor Summary
Constructors
Method Summary
All Methods Instance Methods Concrete Methods
void
Add t
to the triples in this bunch.
boolean
Answer true iff this TripleBunch contains a triple .equals to t
.
boolean
Answer true iff this TripleBunch contains a triple with .sameValueAs
subject, predicate, and object.
int
Answer the current capacity of this HashedTripleBunch; for testing purposes
only.
Answer an iterator over all the triples in this bunch.
Answer an iterator over all the triples in this bunch.
void
Remove the object key
from this hash's keys if it
is present (if it's absent, do nothing).
int
Answer the number of items currently in this TripleBunch.
Answer a spliterator over all the triples in this bunch.
Method Details
contains
public boolean contains (Triple t)
Answer true iff this TripleBunch contains a triple .equals to t
.
Specified by:
contains
in interface TripleBunch
containsBySameValueAs
public boolean containsBySameValueAs (Triple t)
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).
Specified by:
containsBySameValueAs
in interface TripleBunch
size
public int size ()
Answer the number of items currently in this TripleBunch.
Specified by:
size
in interface TripleBunch
See Also:
currentCapacity
public int currentCapacity ()
Answer the current capacity of this HashedTripleBunch; for testing purposes
only. [Note that the bunch is resized when it is more than half-occupied.]
add
Add t
to the triples in this bunch. If t
is already a member, nothing happens. The bunch now .contains this
triple.
Specified by:
add
in interface TripleBunch
remove
Remove the object key
from this hash's keys if it
is present (if it's absent, do nothing). If a key is removed, the
removeAssociatedValues
will be invoked. If a key
is moved, the moveAssociatedValues
method will
be called.
Specified by:
remove
in interface TripleBunch
Overrides:
remove
in class HashCommon <Triple >
iterator
Answer an iterator over all the triples in this bunch. It is unwise to
.remove from this iterator. (It may become illegal.)
Specified by:
iterator
in interface TripleBunch
iterator
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.
Specified by:
iterator
in interface TripleBunch
spliterator
Answer a spliterator over all the triples in this bunch.
Specified by:
spliterator
in interface TripleBunch