Package soot.util

Class SmallNumberedMap<K extends Numberable,​V>

  • All Implemented Interfaces:
    INumberedMap<K,​V>

    public final class SmallNumberedMap<K extends Numberable,​V>
    extends Object
    implements INumberedMap<K,​V>
    A java.util.Map with Numberable objects as the keys.
    Author:
    Ondrej Lhotak
    • Constructor Detail

      • SmallNumberedMap

        public SmallNumberedMap()
    • Method Detail

      • put

        public boolean put​(K key,
                           V value)
        Description copied from interface: INumberedMap
        Associates a value with a key.
        Specified by:
        put in interface INumberedMap<K extends Numberable,​V>
        Parameters:
        key - The key
        value - The value
        Returns:
        True if the association was new, false if the same value was already associated with the given key before
      • get

        public V get​(K key)
        Description copied from interface: INumberedMap
        Returns the value associated with a given key.
        Specified by:
        get in interface INumberedMap<K extends Numberable,​V>
        Parameters:
        key - The key
        Returns:
        The value associated with the given key
      • remove

        public void remove​(K key)
        Description copied from interface: INumberedMap
        Removes the given key from the map
        Specified by:
        remove in interface INumberedMap<K extends Numberable,​V>
        Parameters:
        key - The key to be removed
      • nonNullSize

        public int nonNullSize()
        Returns the number of non-null values in this map.
      • iterator

        public Iterator<V> iterator()
        Returns an iterator over the non-null values.