Class CollectionSortedMap<K,​V>

  • All Implemented Interfaces:
    Serializable, Cloneable, Map<K,​Collection<V>>, NavigableMap<K,​Collection<V>>, SortedMap<K,​Collection<V>>

    public class CollectionSortedMap<K,​V>
    extends TreeMap<K,​Collection<V>>
    INTERNAL: A sorted map which stores entries containing Collection values. Any object can be used as key. The add(key,value) and remove(key,value) makes sure that the Collection values are updated correctly.

    The maintained index must only contain values implementing the Collection interface. The data structure looks like this: {key: [value, value, ...], key: [value, ...]}

    Empty entries are removed by default.

    See Also:
    Serialized Form
    • Field Detail

      • drop_empty

        protected boolean drop_empty
    • Constructor Detail

      • CollectionSortedMap

        public CollectionSortedMap()
      • CollectionSortedMap

        public CollectionSortedMap​(Comparator<K> c)
    • Method Detail

      • createCollection

        protected Collection<V> createCollection()
      • add

        public void add​(K key,
                        V value)
      • remove

        public boolean remove​(Object key,
                              Object value)
      • move

        public void move​(V value,
                         K old_key,
                         K new_key)