Class HashedBunchMap

  • All Implemented Interfaces:

    public class HashedBunchMap
    extends HashCommon<java.lang.Object>
    implements BunchMap
    An implementation of BunchMap that does open-addressed hashing.
    • Constructor Detail

      • HashedBunchMap

        public HashedBunchMap()
    • Method Detail

      • 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​(java.lang.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​(java.lang.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​(java.lang.Object key,
                                    java.util.function.Function<java.lang.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