- All Implemented Interfaces:
BunchMap
An implementation of BunchMap that does open-addressed hashing.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.jena.mem.HashCommon
HashCommon.NotifyEmpty
-
Field Summary
Fields inherited from class org.apache.jena.mem.HashCommon
capacity
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
clear()
Clear this map: all entries are removed.Answer the TripleBunch associated withkey
, ornull
if there isn't one.getOrSet
(Object key, Function<Object, TripleBunch> setter) Get thekey
and return the value found there; if nothing, calculate thevalue
and insert.void
put
(Object key, TripleBunch value) Associatekey
andvalue
.long
size()
The number of items in the bunch.Methods inherited from class org.apache.jena.mem.HashCommon
getItemForTestingAt, keyIterator, keyIterator, remove
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.jena.mem.BunchMap
keyIterator, remove
-
Constructor Details
-
HashedBunchMap
public HashedBunchMap()
-
-
Method Details
-
clear
public void clear()Clear this map: all entries are removed. The keys and value array elements are set to null (so the values may be garbage-collected). -
size
public long size()Description copied from interface:BunchMap
The number of items in the bunch. -
get
Description copied from interface:BunchMap
Answer the TripleBunch associated withkey
, ornull
if there isn't one. -
put
Description copied from interface:BunchMap
Associatekey
andvalue
. Any existing association ofkey
is lost.get
on this key will now deliver this value. -
getOrSet
Description copied from interface:BunchMap
Get thekey
and return the value found there; if nothing, calculate thevalue
and insert. Return the value now the slot.
-