Class ListMapValueValue<K>

  • All Implemented Interfaces:
    Map<K,​K>

    public class ListMapValueValue<K>
    extends Object
    implements Map<K,​K>
    wrap a list for use as map. key and value as the same and it is the value found in the list.
    Author:
    Patrick Vandermaesen
    • Constructor Detail

      • ListMapValueValue

        public ListMapValueValue​(Collection<K> components)
    • Method Detail

      • size

        public int size()
        Specified by:
        size in interface Map<K,​K>
      • isEmpty

        public boolean isEmpty()
        Specified by:
        isEmpty in interface Map<K,​K>
      • containsKey

        public boolean containsKey​(Object key)
        Specified by:
        containsKey in interface Map<K,​K>
      • put

        public K put​(K key,
                     K value)
        Specified by:
        put in interface Map<K,​K>
      • putAll

        public void putAll​(Map<? extends K,​? extends K> m)
        Specified by:
        putAll in interface Map<K,​K>
      • clear

        public void clear()
        Specified by:
        clear in interface Map<K,​K>
      • keySet

        public Set<K> keySet()
        Specified by:
        keySet in interface Map<K,​K>
      • get

        public K get​(Object key)
        Specified by:
        get in interface Map<K,​K>
      • remove

        public K remove​(Object key)
        Specified by:
        remove in interface Map<K,​K>
      • main

        public static void main​(String[] args)