Interface BasicSeries<K extends java.lang.Comparable<? super K>,​V extends java.lang.Comparable<V>>

  • All Superinterfaces:
    java.util.Map<K,​V>, java.util.SortedMap<K,​V>
    All Known Subinterfaces:
    BasicSeries.NaturallySequenced<K,​V>
    All Known Implementing Classes:
    CalendarDateSeries, MappedIndexSeries, NumberSeries, SimpleSeries, TreeSeries

    public interface BasicSeries<K extends java.lang.Comparable<? super K>,​V extends java.lang.Comparable<V>>
    extends java.util.SortedMap<K,​V>
    A BasicSeries is a SortedMap with:
    • Keys restricted to Comparable (the keys have a natural order)
    • Values restricted to Comparable (the values are "numeric" as in extending Number or implementing NumberDefinition.
    • The option to associate a name and colour with the data.
    • A few additional methods to help access and modify series entries.
    • Method Detail

      • coordinate

        static <K extends java.lang.Comparable<? super K>> CoordinatedSet<K> coordinate​(java.util.List<? extends BasicSeries<K,​?>> uncoordinated)
      • findEarliestFirstKey

        static <K extends java.lang.Comparable<? super K>> K findEarliestFirstKey​(java.util.Collection<? extends BasicSeries<K,​?>> collection)
      • findEarliestLastKey

        static <K extends java.lang.Comparable<? super K>> K findEarliestLastKey​(java.util.Collection<? extends BasicSeries<K,​?>> collection)
      • findLatestFirstKey

        static <K extends java.lang.Comparable<? super K>> K findLatestFirstKey​(java.util.Collection<? extends BasicSeries<K,​?>> collection)
      • findLatestLastKey

        static <K extends java.lang.Comparable<? super K>> K findLatestLastKey​(java.util.Collection<? extends BasicSeries<K,​?>> collection)
      • complete

        default void complete​(java.util.function.UnaryOperator<K> keyIncrementor)
        Will fill in missing values, inbetween the first and last keys.
      • doubleValue

        default double doubleValue​(K key)
      • firstValue

        default V firstValue()
      • get

        V get​(K key)
      • get

        default V get​(java.lang.Object key)
        Specified by:
        get in interface java.util.Map<K extends java.lang.Comparable<? super K>,​V extends java.lang.Comparable<V>>
      • getName

        java.lang.String getName()
      • lastValue

        default V lastValue()
      • name

        default BasicSeries<K,​V> name​(java.lang.String name)
      • put

        default double put​(K key,
                           double value)
        Will only work if values are types as Double.
        See Also:
        #put(Comparable, Number)
      • putAll

        default void putAll​(java.util.Collection<? extends EntryPair<? extends K,​? extends V>> data)
      • resample

        default <K2 extends java.lang.Comparable<? super K2>> void resample​(java.util.function.Function<K,​K2> keyTranslator,
                                                                            BasicSeries<K2,​V> destination)
      • resample

        BasicSeries<K,​V> resample​(java.util.function.UnaryOperator<K> keyTranslator)
      • setColour

        void setColour​(ColourData colour)
      • setName

        void setName​(java.lang.String name)