public class HashedTripleBunch extends HashCommon<Triple> implements TripleBunch
HashCommon.NotifyEmpty
capacity
Constructor and Description |
---|
HashedTripleBunch(TripleBunch b) |
Modifier and Type | Method and Description |
---|---|
void |
add(Triple t)
Add
t to the triples in this bunch. |
boolean |
contains(Triple t)
Answer true iff this TripleBunch contains a triple .equals to
t . |
boolean |
containsBySameValueAs(Triple t)
Answer true iff this TripleBunch contains a triple with .sameValueAs
subject, predicate, and object.
|
int |
currentCapacity()
Answer the current capacity of this HashedTripleBunch; for testing purposes
only.
|
ExtendedIterator<Triple> |
iterator()
Answer an iterator over all the triples in this bunch.
|
ExtendedIterator<Triple> |
iterator(HashCommon.NotifyEmpty container)
Answer an iterator over all the triples in this bunch.
|
void |
remove(Triple t)
Remove the object
key from this hash's keys if it
is present (if it's absent, do nothing). |
int |
size()
Answer the number of items currently in this TripleBunch.
|
getItemForTestingAt, keyIterator, keyIterator
public HashedTripleBunch(TripleBunch b)
public boolean contains(Triple t)
TripleBunch
t
.contains
in interface TripleBunch
public boolean containsBySameValueAs(Triple t)
TripleBunch
containsBySameValueAs
in interface TripleBunch
public int size()
size
in interface TripleBunch
TripleBunch.size()
public int currentCapacity()
public void add(Triple t)
TripleBunch
t
to the triples in this bunch. If t
is already a member, nothing happens. The bunch now .contains this
triple.add
in interface TripleBunch
public void remove(Triple t)
HashCommon
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.remove
in interface TripleBunch
remove
in class HashCommon<Triple>
public ExtendedIterator<Triple> iterator()
TripleBunch
iterator
in interface TripleBunch
public ExtendedIterator<Triple> iterator(HashCommon.NotifyEmpty container)
TripleBunch
emptied
method of
container
is invoked.iterator
in interface TripleBunch
Licenced under the Apache License, Version 2.0