Class InterpolatingTreeMap<K extends Number,​V extends Number>

java.lang.Object
edu.wpi.first.util.InterpolatingTreeMap<K,​V>
Type Parameters:
K - Key type.
V - Value type.

@Deprecated(forRemoval=true,
            since="2024")
public class InterpolatingTreeMap<K extends Number,​V extends Number>
extends Object
Deprecated, for removal: This API element is subject to removal in a future version.
Interpolating Tree Maps are used to get values at points that are not defined by making a guess from points that are defined. This uses linear interpolation.
  • Constructor Summary

    Constructors 
    Constructor Description
    InterpolatingTreeMap()
    Deprecated, for removal: This API element is subject to removal in a future version.
    Default constructor.
  • Method Summary

    Modifier and Type Method Description
    void clear()
    Deprecated, for removal: This API element is subject to removal in a future version.
    Clears the contents.
    Double get​(K key)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Returns the value associated with a given key.
    void put​(K key, V value)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Inserts a key-value pair.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

  • Method Details

    • put

      public void put​(K key, V value)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Inserts a key-value pair.
      Parameters:
      key - The key.
      value - The value.
    • get

      public Double get​(K key)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Returns the value associated with a given key.

      If there's no matching key, the value returned will be a linear interpolation between the keys before and after the provided one.

      Parameters:
      key - The key.
      Returns:
      The value associated with the given key.
    • clear

      public void clear()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Clears the contents.