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

    • Constructor Detail

      • SkipLevels

        protected SkipLevels()
      • SkipLevels

        public SkipLevels​(int size,
                          SkipSpan<K,​V> span)
    • Method Detail

      • killInstance

        public void killInstance()
      • flush

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

        public String print()
      • printAll

        public String printAll()
      • getSpan

        public SkipSpan<K,​V> getSpan​(int start,
                                           K key,
                                           int[] search)
      • key

        public K key()
      • get

        public V get​(int start,
                     K key)
      • remove

        public Object[] remove​(int start,
                               K key,
                               SkipList<K,​V> sl)
        Returns:
        An array of two objects or null. rv[0] is the removed object. rv[1] is the deleted SkipLevels if the removed object was the last in the SkipLevels, and the deleted SkipLevels is taller than this SkipLevels. rv is null if no object was removed.
      • put

        public SkipLevels<K,​V> put​(int start,
                                         K key,
                                         V val,
                                         SkipList<K,​V> sl)
        Returns:
        the new level if it caused a split and we made a new level, and the new level is taller than our level; else null if it went in an existing level or the new level is our height or less.
      • blvlck

        public boolean blvlck​(boolean fix)
      • blvlck

        public boolean blvlck​(boolean fix,
                              int width,
                              SkipLevels<K,​V>[] prevLevels)