Interface TimeMap<K,​V>

    • Method Detail

      • put

        boolean put​(K key,
                    V value)
        Put the value at the given key.
        Parameters:
        key - key
        value - value
        Returns:
        true if key is a new key, false otherwise
      • remove

        boolean remove​(K key)
        Remove the value at the given key.
        Parameters:
        key - key
        Returns:
        true if the key existed, false otherwise
      • get

        Object get​(Interval interval,
                   Estimator estimator)
        Get the estimated value for the given interval.

        The estimator is used to determine the way multiple interval values are merged together (e.g average, first, median).

        Parameters:
        interval - interval query
        estimator - estimator used
        Returns:
        estimated value
      • get

        V get​(K key,
              V defaultValue)
        Get the value for the given key.

        Return defaultValue if the value is not found.

        Parameters:
        key - key
        defaultValue - default value
        Returns:
        found value or the default value if not found
      • toValuesArray

        V[] toValuesArray()
        Returns all the values as an array.
        Returns:
        values array
      • toKeysArray

        K[] toKeysArray()
        Returns all the keys as an array.
        Returns:
        keys array
      • contains

        boolean contains​(K key)
        Returns true if this map contains the given key.
        Parameters:
        key - key
        Returns:
        true if contains, false otherwise
      • clear

        void clear()
        Empties this map.
      • getTypeClass

        Class<V> getTypeClass()
        Returns the value type class.
        Returns:
        type class
      • isSupported

        boolean isSupported​(Estimator estimator)
        Returns whether estimator is supported.
        Parameters:
        estimator - estimator
        Returns:
        true if this map supports estimator
      • size

        int size()
        Returns the size.
        Returns:
        the number of elements in this map
      • isEmpty

        boolean isEmpty()
        Returns true if this map is empty.
        Returns:
        true if empty, false otherwise
      • toString

        String toString​(TimeFormat timeFormat)
        Returns this map as a string.
        Parameters:
        timeFormat - time format
        Returns:
        map as string
      • toString

        String toString​(TimeFormat timeFormat,
                        org.joda.time.DateTimeZone timeZone)
        Returns this map as a string.
        Parameters:
        timeFormat - time format
        timeZone - time zone
        Returns:
        map as string