Class HashedBunchMap

All Implemented Interfaces:

public class HashedBunchMap extends HashCommon<Object> implements BunchMap
An implementation of BunchMap that does open-addressed hashing.
  • 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).
      Specified by:
      clear in interface BunchMap
    • size

      public long size()
      Description copied from interface: BunchMap
      The number of items in the bunch.
      Specified by:
      size in interface BunchMap
    • get

      public TripleBunch get(Object key)
      Description copied from interface: BunchMap
      Answer the TripleBunch associated with key, or null if there isn't one.
      Specified by:
      get in interface BunchMap
    • put

      public void put(Object key, TripleBunch value)
      Description copied from interface: BunchMap
      Associate key and value. Any existing association of key is lost. get on this key will now deliver this value.
      Specified by:
      put in interface BunchMap
    • getOrSet

      public TripleBunch getOrSet(Object key, Function<Object,TripleBunch> setter)
      Description copied from interface: BunchMap
      Get the key and return the value found there; if nothing, calculate the value and insert. Return the value now the slot.
      Specified by:
      getOrSet in interface BunchMap
    • iterator

      public Iterator<TripleBunch> iterator()
      Specified by:
      iterator in interface BunchMap
    • spliterator

      public Spliterator<TripleBunch> spliterator()
      Specified by:
      spliterator in interface BunchMap