Klasse Double2ObjectRBTreeMap<V>

java.lang.Object
java.util.AbstractMap<Double,V>
speiger.src.collections.doubles.maps.abstracts.AbstractDouble2ObjectMap<V>
speiger.src.collections.doubles.maps.impl.tree.Double2ObjectRBTreeMap<V>
Typparameter:
V - the keyType of elements maintained by this Collection
Alle implementierten Schnittstellen:
DoubleFunction<V>, Map<Double,V>, NavigableMap<Double,V>, SortedMap<Double,V>, DoubleFunction<V>, Double2ObjectMap<V>, Double2ObjectNavigableMap<V>, Double2ObjectSortedMap<V>

public class Double2ObjectRBTreeMap<V> extends AbstractDouble2ObjectMap<V> implements Double2ObjectNavigableMap<V>
A Simple Type Specific RB TreeMap implementation that reduces boxing/unboxing. It is using a bit more memory then FastUtil, but it saves a lot of Performance on the Optimized removal and iteration logic. Which makes the implementation actually useable and does not get outperformed by Javas default implementation.
  • Konstruktordetails

    • Double2ObjectRBTreeMap

      public Double2ObjectRBTreeMap()
      Default Constructor
    • Double2ObjectRBTreeMap

      public Double2ObjectRBTreeMap(DoubleComparator comp)
      Constructor that allows to define the sorter
      Parameter:
      comp - the function that decides how the tree is sorted, can be null
    • Double2ObjectRBTreeMap

      public Double2ObjectRBTreeMap(Double[] keys, V[] values)
      Helper constructor that allow to create a map from boxed values (it will unbox them)
      Parameter:
      keys - the keys that should be put into the map
      values - the values that should be put into the map.
      Löst aus:
      IllegalStateException - if the keys and values do not match in lenght
    • Double2ObjectRBTreeMap

      public Double2ObjectRBTreeMap(Double[] keys, V[] values, DoubleComparator comp)
      Helper constructor that has a custom sorter and allow to create a map from boxed values (it will unbox them)
      Parameter:
      keys - the keys that should be put into the map
      values - the values that should be put into the map.
      comp - the function that decides how the tree is sorted, can be null
      Löst aus:
      IllegalStateException - if the keys and values do not match in lenght
    • Double2ObjectRBTreeMap

      public Double2ObjectRBTreeMap(double[] keys, V[] values)
      Helper constructor that allow to create a map from unboxed values
      Parameter:
      keys - the keys that should be put into the map
      values - the values that should be put into the map.
      Löst aus:
      IllegalStateException - if the keys and values do not match in lenght
    • Double2ObjectRBTreeMap

      public Double2ObjectRBTreeMap(double[] keys, V[] values, DoubleComparator comp)
      Helper constructor that has a custom sorter and allow to create a map from unboxed values
      Parameter:
      keys - the keys that should be put into the map
      values - the values that should be put into the map.
      comp - the function that decides how the tree is sorted, can be null
      Löst aus:
      IllegalStateException - if the keys and values do not match in lenght
    • Double2ObjectRBTreeMap

      public Double2ObjectRBTreeMap(Map<? extends Double,? extends V> map)
      A Helper constructor that allows to create a Map with exactly the same values as the provided map.
      Parameter:
      map - the values that should be present in the map
    • Double2ObjectRBTreeMap

      public Double2ObjectRBTreeMap(Map<? extends Double,? extends V> map, DoubleComparator comp)
      A Helper constructor that has a custom sorter and allows to create a Map with exactly the same values as the provided map.
      Parameter:
      map - the values that should be present in the map
      comp - the function that decides how the tree is sorted, can be null
    • Double2ObjectRBTreeMap

      public Double2ObjectRBTreeMap(Double2ObjectMap<V> map)
      A Type Specific Helper function that allows to create a new Map with exactly the same values as the provided map.
      Parameter:
      map - the values that should be present in the map
    • Double2ObjectRBTreeMap

      public Double2ObjectRBTreeMap(Double2ObjectMap<V> map, DoubleComparator comp)
      A Type Specific Helper function that has a custom sorter and allows to create a new Map with exactly the same values as the provided map.
      Parameter:
      map - the values that should be present in the map
      comp - the function that decides how the tree is sorted, can be null
  • Methodendetails