Package org.apache.jena.mem
Interface BunchMap
-
- All Known Implementing Classes:
HashedBunchMap
,WrappedHashMap
public interface BunchMap
A pruned (and slightly stewed) version of Map, containing just those operations required by NodeToTriplesMaps. BunchMaps contain only TripleBunch's.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
clear()
Clear this map: all entries are removed.TripleBunch
get(java.lang.Object key)
Answer the TripleBunch associated withkey
, ornull
if there isn't one.TripleBunch
getOrSet(java.lang.Object key, java.util.function.Function<java.lang.Object,TripleBunch> setter)
Get thekey
and return the value found there; if nothing, calculate thevalue
and insert.ExtendedIterator<java.lang.Object>
keyIterator()
Answer an iterator over all the keys in this map.void
put(java.lang.Object key, TripleBunch value)
Associatekey
andvalue
.void
remove(java.lang.Object key)
Remove any association forkey
;get
on this key will now delivernull
.long
size()
The number of items in the bunch.
-
-
-
Method Detail
-
clear
void clear()
Clear this map: all entries are removed.
-
size
long size()
The number of items in the bunch.
-
get
TripleBunch get(java.lang.Object key)
Answer the TripleBunch associated withkey
, ornull
if there isn't one.
-
put
void put(java.lang.Object key, TripleBunch value)
Associatekey
andvalue
. Any existing association ofkey
is lost.get
on this key will now deliver this value.
-
getOrSet
TripleBunch getOrSet(java.lang.Object key, java.util.function.Function<java.lang.Object,TripleBunch> setter)
Get thekey
and return the value found there; if nothing, calculate thevalue
and insert. Return the value now the slot.
-
remove
void remove(java.lang.Object key)
Remove any association forkey
;get
on this key will now delivernull
.
-
keyIterator
ExtendedIterator<java.lang.Object> keyIterator()
Answer an iterator over all the keys in this map.
-
-