Package org.apache.jena.mem
Class HashCommon<Key>
- java.lang.Object
-
- org.apache.jena.mem.HashCommon<Key>
-
- Direct Known Subclasses:
HashedBunchMap
,HashedTripleBunch
public abstract class HashCommon<Key> extends java.lang.Object
Shared stuff for our hashing implementations: does the base work for hashing and growth sizes.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
HashCommon.NotifyEmpty
A hashed structure may become empty as a side-effect of a .remove on one of its iterators: a container can request notification of this by passing aNotifyEmpty
object in when the iterator is constructed, and itsemptied
method is called when the bunch becomes empty.
-
Field Summary
Fields Modifier and Type Field Description int
capacity
The capacity (length) of the key array.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Object
getItemForTestingAt(int i)
Answer the item at indexi
ofkeys
.ExtendedIterator<Key>
keyIterator()
ExtendedIterator<Key>
keyIterator(HashCommon.NotifyEmpty container)
void
remove(Key key)
Remove the objectkey
from this hash's keys if it is present (if it's absent, do nothing).
-
-
-
Method Detail
-
getItemForTestingAt
public java.lang.Object getItemForTestingAt(int i)
Answer the item at indexi
ofkeys
. This method is for testing purposes only.
-
remove
public void remove(Key key)
Remove the objectkey
from this hash's keys if it is present (if it's absent, do nothing). If a key is removed, theremoveAssociatedValues
will be invoked. If a key is moved, themoveAssociatedValues
method will be called.
-
keyIterator
public ExtendedIterator<Key> keyIterator()
-
keyIterator
public ExtendedIterator<Key> keyIterator(HashCommon.NotifyEmpty container)
-
-