Class LongTreeValueMapTest<V>

java.lang.Object
com.polytechnik.utils.LongHashMap<V>
com.polytechnik.utils.LongTreeValueMapTest<V>

public class LongTreeValueMapTest<V> extends LongHashMap<V>
An unoptimized TreeMap, just for testing.
  • Field Details

  • Constructor Details

    • LongTreeValueMapTest

      public LongTreeValueMapTest(Comparator<V> cmp)
  • Method Details

    • put

      public V put(long key, V value)
      Description copied from class: LongHashMap
      Associates the specified value with the specified key in this map. If the map previously contained a mapping for this key, the old value is replaced.
      Overrides:
      put in class LongHashMap<V>
      Parameters:
      key - key with which the specified value is to be associated.
      value - value to be associated with the specified key.
      Returns:
      previous value associated with specified key, or null if there was no mapping for key. A null return can also indicate that the HashMap previously associated null with the specified key.
    • remove

      public V remove(long key)
      Description copied from class: LongHashMap
      Removes the mapping for this key from this map if present.
      Overrides:
      remove in class LongHashMap<V>
      Parameters:
      key - key whose mapping is to be removed from the map.
      Returns:
      previous value associated with specified key, or null if there was no mapping for key. A null return can also indicate that the map previously associated null with the specified key.
    • clear

      public void clear()
      Description copied from class: LongHashMap
      Removes all mappings from this map.
      Overrides:
      clear in class LongHashMap<V>
    • copyValues

      public final int copyValues(V[] valuesarr)
      Overrides:
      copyValues in class LongHashMap<V>
    • lastValue

      public V lastValue()
    • firstValue

      public V firstValue()
    • getInternalValuesTable

      protected TreeMap<V,Object> getInternalValuesTable()
    • test_order

      static void test_order(Random r)
    • main

      public static void main(String[] args)