Class PersistentHashMap.MutHashMap<K,​V>

    • Method Detail

      • entry

        @NotNull
        public @NotNull Option<UnmodMap.UnEntry<K,​V>> entry​(K key)
        Description copied from interface: BaseMap
        Returns an option of the key/value pair associated with this key
        Specified by:
        entry in interface BaseMap<K,​V>
      • iterator

        @NotNull
        public @NotNull UnmodIterator<UnmodMap.UnEntry<K,​V>> iterator()
        Description copied from interface: UnmodIterable
        A one-time use, mutable, not-thread-safe way to get each value of the underling collection in turn. I experimented with various thread-safe alternatives, but the JVM is optimized around iterators so this is the lowest common denominator of collection iteration, even though iterators are inherently mutable.
        Specified by:
        iterator in interface Iterable<K>
        Specified by:
        iterator in interface UnmodIterable<K>
      • immutable

        @NotNull
        public @NotNull PersistentHashMap<K,​V> immutable()
        Description copied from interface: MutMap
        Returns an immutable version of this mutable map.
        Specified by:
        immutable in interface MutMap<K,​V>
      • size

        public int size()
        Description copied from interface: Sized
        Returns the number of items in this collection or iterable.
        Specified by:
        size in interface Map<K,​V>
        Specified by:
        size in interface Sized