Class SkipList<K extends Comparable<? super K>,​V>

    • Constructor Detail

      • SkipList

        protected SkipList()
      • SkipList

        public SkipList​(int span)
    • Method Detail

      • flush

        public void flush()
        Specified by:
        flush in interface Flushable
      • size

        public int size()
      • addItem

        public void addItem()
      • delItem

        public void delItem()
      • maxLevels

        public int maxLevels()
        Returns:
        4 since we don't track span count here any more - see override Fix if for some reason you want a huge in-memory skiplist.
      • generateColHeight

        public int generateColHeight()
        Returns:
        0..maxLevels(), each successive one with probability 1 / P
      • put

        public void put​(K key,
                        V val)
      • remove

        public V remove​(K key)
      • printSL

        @Deprecated
        public void printSL()
        Deprecated.
        goes to System.out
        dumps all the skip levels
      • print

        @Deprecated
        public void print()
        Deprecated.
        goes to System.out
        dumps all the data
      • get

        public V get​(K key)
      • find

        public SkipIterator<K,​V> find​(K key)
        Returns:
        an iterator where nextKey() is the first one greater than or equal to 'key'
      • balance

        public void balance()