Class TreeMultimap.Builder<V>

  • Enclosing class:
    TreeMultimap<K,​V>

    public static class TreeMultimap.Builder<V>
    extends java.lang.Object
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      <K extends java.lang.Comparable<? super K>,​V2 extends V>
      java.util.stream.Collector<Tuple2<K,​V2>,​java.util.ArrayList<Tuple2<K,​V2>>,​TreeMultimap<K,​V2>>
      collector()
      Returns a Collector which may be used in conjunction with Stream.collect(Collector) to obtain a TreeMultimap.
      <K,​V2 extends V>
      java.util.stream.Collector<Tuple2<K,​V2>,​java.util.ArrayList<Tuple2<K,​V2>>,​TreeMultimap<K,​V2>>
      collector​(java.util.Comparator<? super K> keyComparator)
      Returns a Collector which may be used in conjunction with Stream.collect(Collector) to obtain a TreeMultimap.
      <K extends java.lang.Comparable<? super K>,​V2 extends V>
      TreeMultimap<K,​V2>
      empty()
      Returns the empty TreeMultimap.
      <K,​V2 extends V>
      TreeMultimap<K,​V2>
      empty​(java.util.Comparator<? super K> keyComparator)
      Returns the empty TreeMultimap using the given key comparator.
      <K extends java.lang.Comparable<? super K>,​V2 extends V>
      TreeMultimap<K,​V2>
      fill​(int n, Tuple2<? extends K,​? extends V2> element)
      Returns a TreeMultimap containing n times the given element The underlying key comparator is the natural comparator of K.
      <K extends java.lang.Comparable<? super K>,​V2 extends V>
      TreeMultimap<K,​V2>
      fill​(int n, java.util.function.Supplier<? extends Tuple2<? extends K,​? extends V2>> s)
      Returns a TreeMultimap containing n values supplied by a given Supplier s.
      <K,​V2 extends V>
      TreeMultimap<K,​V2>
      fill​(java.util.Comparator<? super K> keyComparator, int n, Tuple2<? extends K,​? extends V2> element)
      Returns a TreeMultimap containing n times the given element
      <K,​V2 extends V>
      TreeMultimap<K,​V2>
      fill​(java.util.Comparator<? super K> keyComparator, int n, java.util.function.Supplier<? extends Tuple2<? extends K,​? extends V2>> s)
      Returns a TreeMultimap containing n values supplied by a given Supplier s.
      <K extends java.lang.Comparable<? super K>,​V2 extends V>
      TreeMultimap<K,​V2>
      of​(Tuple2<? extends K,​? extends V2> entry)
      Creates a TreeMultimap of the given list of key-value pairs.
      <K,​V2 extends V>
      TreeMultimap<K,​V2>
      of​(java.util.Comparator<? super K> keyComparator, Tuple2<? extends K,​? extends V2> entry)
      Returns a singleton TreeMultimap, i.e.
      <K,​V2 extends V>
      TreeMultimap<K,​V2>
      of​(java.util.Comparator<? super K> keyComparator, K key, V2 value)
      Creates a TreeMultimap of the given key-value pair.
      <K,​V2 extends V>
      TreeMultimap<K,​V2>
      of​(java.util.Comparator<? super K> keyComparator, K k1, V2 v1, K k2, V2 v2)
      Creates a TreeMultimap of the given list of key-value pairs.
      <K,​V2 extends V>
      TreeMultimap<K,​V2>
      of​(java.util.Comparator<? super K> keyComparator, K k1, V2 v1, K k2, V2 v2, K k3, V2 v3)
      Creates a TreeMultimap of the given list of key-value pairs.
      <K,​V2 extends V>
      TreeMultimap<K,​V2>
      of​(java.util.Comparator<? super K> keyComparator, K k1, V2 v1, K k2, V2 v2, K k3, V2 v3, K k4, V2 v4)
      Creates a TreeMultimap of the given list of key-value pairs.
      <K,​V2 extends V>
      TreeMultimap<K,​V2>
      of​(java.util.Comparator<? super K> keyComparator, K k1, V2 v1, K k2, V2 v2, K k3, V2 v3, K k4, V2 v4, K k5, V2 v5)
      Creates a TreeMultimap of the given list of key-value pairs.
      <K,​V2 extends V>
      TreeMultimap<K,​V2>
      of​(java.util.Comparator<? super K> keyComparator, K k1, V2 v1, K k2, V2 v2, K k3, V2 v3, K k4, V2 v4, K k5, V2 v5, K k6, V2 v6)
      Creates a TreeMultimap of the given list of key-value pairs.
      <K,​V2 extends V>
      TreeMultimap<K,​V2>
      of​(java.util.Comparator<? super K> keyComparator, K k1, V2 v1, K k2, V2 v2, K k3, V2 v3, K k4, V2 v4, K k5, V2 v5, K k6, V2 v6, K k7, V2 v7)
      Creates a TreeMultimap of the given list of key-value pairs.
      <K,​V2 extends V>
      TreeMultimap<K,​V2>
      of​(java.util.Comparator<? super K> keyComparator, K k1, V2 v1, K k2, V2 v2, K k3, V2 v3, K k4, V2 v4, K k5, V2 v5, K k6, V2 v6, K k7, V2 v7, K k8, V2 v8)
      Creates a TreeMultimap of the given list of key-value pairs.
      <K,​V2 extends V>
      TreeMultimap<K,​V2>
      of​(java.util.Comparator<? super K> keyComparator, K k1, V2 v1, K k2, V2 v2, K k3, V2 v3, K k4, V2 v4, K k5, V2 v5, K k6, V2 v6, K k7, V2 v7, K k8, V2 v8, K k9, V2 v9)
      Creates a TreeMultimap of the given list of key-value pairs.
      <K,​V2 extends V>
      TreeMultimap<K,​V2>
      of​(java.util.Comparator<? super K> keyComparator, K k1, V2 v1, K k2, V2 v2, K k3, V2 v3, K k4, V2 v4, K k5, V2 v5, K k6, V2 v6, K k7, V2 v7, K k8, V2 v8, K k9, V2 v9, K k10, V2 v10)
      Creates a TreeMultimap of the given list of key-value pairs.
      <K extends java.lang.Comparable<? super K>,​V2 extends V>
      TreeMultimap<K,​V2>
      of​(K key, V2 value)
      Creates a TreeMultimap of the given key-value pair.
      <K extends java.lang.Comparable<? super K>,​V2 extends V>
      TreeMultimap<K,​V2>
      of​(K k1, V2 v1, K k2, V2 v2)
      Creates a TreeMultimap of the given list of key-value pairs.
      <K extends java.lang.Comparable<? super K>,​V2 extends V>
      TreeMultimap<K,​V2>
      of​(K k1, V2 v1, K k2, V2 v2, K k3, V2 v3)
      Creates a TreeMultimap of the given list of key-value pairs.
      <K extends java.lang.Comparable<? super K>,​V2 extends V>
      TreeMultimap<K,​V2>
      of​(K k1, V2 v1, K k2, V2 v2, K k3, V2 v3, K k4, V2 v4)
      Creates a TreeMultimap of the given list of key-value pairs.
      <K extends java.lang.Comparable<? super K>,​V2 extends V>
      TreeMultimap<K,​V2>
      of​(K k1, V2 v1, K k2, V2 v2, K k3, V2 v3, K k4, V2 v4, K k5, V2 v5)
      Creates a TreeMultimap of the given list of key-value pairs.
      <K extends java.lang.Comparable<? super K>,​V2 extends V>
      TreeMultimap<K,​V2>
      of​(K k1, V2 v1, K k2, V2 v2, K k3, V2 v3, K k4, V2 v4, K k5, V2 v5, K k6, V2 v6)
      Creates a TreeMultimap of the given list of key-value pairs.
      <K extends java.lang.Comparable<? super K>,​V2 extends V>
      TreeMultimap<K,​V2>
      of​(K k1, V2 v1, K k2, V2 v2, K k3, V2 v3, K k4, V2 v4, K k5, V2 v5, K k6, V2 v6, K k7, V2 v7)
      Creates a TreeMultimap of the given list of key-value pairs.
      <K extends java.lang.Comparable<? super K>,​V2 extends V>
      TreeMultimap<K,​V2>
      of​(K k1, V2 v1, K k2, V2 v2, K k3, V2 v3, K k4, V2 v4, K k5, V2 v5, K k6, V2 v6, K k7, V2 v7, K k8, V2 v8)
      Creates a TreeMultimap of the given list of key-value pairs.
      <K extends java.lang.Comparable<? super K>,​V2 extends V>
      TreeMultimap<K,​V2>
      of​(K k1, V2 v1, K k2, V2 v2, K k3, V2 v3, K k4, V2 v4, K k5, V2 v5, K k6, V2 v6, K k7, V2 v7, K k8, V2 v8, K k9, V2 v9)
      Creates a TreeMultimap of the given list of key-value pairs.
      <K extends java.lang.Comparable<? super K>,​V2 extends V>
      TreeMultimap<K,​V2>
      of​(K k1, V2 v1, K k2, V2 v2, K k3, V2 v3, K k4, V2 v4, K k5, V2 v5, K k6, V2 v6, K k7, V2 v7, K k8, V2 v8, K k9, V2 v9, K k10, V2 v10)
      Creates a TreeMultimap of the given list of key-value pairs.
      <K,​V2 extends V>
      TreeMultimap<K,​V2>
      ofAll​(java.util.Comparator<? super K> keyComparator, java.util.Map<? extends K,​? extends V2> map)
      Returns a TreeMultimap, from a source java.util.Map.
      <T,​K,​V2 extends V>
      TreeMultimap<K,​V2>
      ofAll​(java.util.Comparator<? super K> keyComparator, java.util.stream.Stream<? extends T> stream, java.util.function.Function<? super T,​? extends K> keyMapper, java.util.function.Function<? super T,​? extends V2> valueMapper)
      Returns a TreeMultimap, from entries mapped from stream.
      <T,​K,​V2 extends V>
      TreeMultimap<K,​V2>
      ofAll​(java.util.Comparator<? super K> keyComparator, java.util.stream.Stream<? extends T> stream, java.util.function.Function<? super T,​Tuple2<? extends K,​? extends V2>> entryMapper)
      Returns a TreeMultimap, from entries mapped from stream.
      <K extends java.lang.Comparable<? super K>,​V2 extends V>
      TreeMultimap<K,​V2>
      ofAll​(java.util.Map<? extends K,​? extends V2> map)
      Returns a TreeMultimap, from a source java.util.Map.
      <T,​K extends java.lang.Comparable<? super K>,​V2 extends V>
      TreeMultimap<K,​V2>
      ofAll​(java.util.stream.Stream<? extends T> stream, java.util.function.Function<? super T,​? extends K> keyMapper, java.util.function.Function<? super T,​? extends V2> valueMapper)
      Returns a TreeMultimap, from entries mapped from stream.
      <T,​K extends java.lang.Comparable<? super K>,​V2 extends V>
      TreeMultimap<K,​V2>
      ofAll​(java.util.stream.Stream<? extends T> stream, java.util.function.Function<? super T,​Tuple2<? extends K,​? extends V2>> entryMapper)
      Returns a TreeMultimap, from entries mapped from stream.
      <K extends java.lang.Comparable<? super K>,​V2 extends V>
      TreeMultimap<K,​V2>
      ofEntries​(Tuple2<? extends K,​? extends V2>... entries)
      Creates a TreeMultimap of the given entries.
      <K extends java.lang.Comparable<? super K>,​V2 extends V>
      TreeMultimap<K,​V2>
      ofEntries​(java.lang.Iterable<? extends Tuple2<? extends K,​? extends V2>> entries)
      Creates a TreeMultimap of the given entries.
      <K,​V2 extends V>
      TreeMultimap<K,​V2>
      ofEntries​(java.util.Comparator<? super K> keyComparator, Tuple2<? extends K,​? extends V2>... entries)
      Creates a TreeMultimap of the given entries.
      <K,​V2 extends V>
      TreeMultimap<K,​V2>
      ofEntries​(java.util.Comparator<? super K> keyComparator, java.lang.Iterable<? extends Tuple2<? extends K,​? extends V2>> entries)
      Creates a TreeMultimap of the given entries.
      <K,​V2 extends V>
      TreeMultimap<K,​V2>
      ofEntries​(java.util.Comparator<? super K> keyComparator, java.util.Map.Entry<? extends K,​? extends V2>... entries)
      Creates a TreeMultimap of the given entries.
      <K extends java.lang.Comparable<? super K>,​V2 extends V>
      TreeMultimap<K,​V2>
      ofEntries​(java.util.Map.Entry<? extends K,​? extends V2>... entries)
      Creates a TreeMultimap of the given entries.
      <K extends java.lang.Comparable<? super K>,​V2 extends V>
      TreeMultimap<K,​V2>
      tabulate​(int n, java.util.function.Function<? super java.lang.Integer,​? extends Tuple2<? extends K,​? extends V2>> f)
      Returns a TreeMultimap containing n values of a given Function f over a range of integer values from 0 to n - 1.
      <K,​V2 extends V>
      TreeMultimap<K,​V2>
      tabulate​(java.util.Comparator<? super K> keyComparator, int n, java.util.function.Function<? super java.lang.Integer,​? extends Tuple2<? extends K,​? extends V2>> f)
      Returns a TreeMultimap containing n values of a given Function f over a range of integer values from 0 to n - 1.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • empty

        public <K extends java.lang.Comparable<? super K>,​V2 extends VTreeMultimap<K,​V2> empty()
        Returns the empty TreeMultimap. The underlying key comparator is the natural comparator of K.
        Type Parameters:
        K - The key type
        V2 - The value type
        Returns:
        A new empty TreeMultimap.
      • empty

        public <K,​V2 extends VTreeMultimap<K,​V2> empty​(java.util.Comparator<? super K> keyComparator)
        Returns the empty TreeMultimap using the given key comparator.
        Type Parameters:
        K - The key type
        V2 - The value type
        Parameters:
        keyComparator - The comparator used to sort the entries by their key.
        Returns:
        A new empty TreeMultimap.
      • ofEntries

        public <K extends java.lang.Comparable<? super K>,​V2 extends VTreeMultimap<K,​V2> ofEntries​(java.lang.Iterable<? extends Tuple2<? extends K,​? extends V2>> entries)
        Creates a TreeMultimap of the given entries. The underlying key comparator is the natural comparator of K.
        Type Parameters:
        K - The key type
        V2 - The value type
        Parameters:
        entries - Multimap entries
        Returns:
        A new TreeMultimap containing the given entries.
      • ofEntries

        public <K,​V2 extends VTreeMultimap<K,​V2> ofEntries​(java.util.Comparator<? super K> keyComparator,
                                                                         java.lang.Iterable<? extends Tuple2<? extends K,​? extends V2>> entries)
        Creates a TreeMultimap of the given entries.
        Type Parameters:
        K - The key type
        V2 - The value type
        Parameters:
        keyComparator - The comparator used to sort the entries by their key.
        entries - Multimap entries
        Returns:
        A new TreeMultimap containing the given entries.
      • ofEntries

        @SafeVarargs
        public final <K extends java.lang.Comparable<? super K>,​V2 extends VTreeMultimap<K,​V2> ofEntries​(Tuple2<? extends K,​? extends V2>... entries)
        Creates a TreeMultimap of the given entries. The underlying key comparator is the natural comparator of K.
        Type Parameters:
        K - The key type
        V2 - The value type
        Parameters:
        entries - Multimap entries
        Returns:
        A new TreeMultimap containing the given entries.
      • ofEntries

        @SafeVarargs
        public final <K,​V2 extends VTreeMultimap<K,​V2> ofEntries​(java.util.Comparator<? super K> keyComparator,
                                                                               Tuple2<? extends K,​? extends V2>... entries)
        Creates a TreeMultimap of the given entries.
        Type Parameters:
        K - The key type
        V2 - The value type
        Parameters:
        keyComparator - The comparator used to sort the entries by their key.
        entries - Multimap entries
        Returns:
        A new TreeMultimap containing the given entries.
      • ofEntries

        @SafeVarargs
        public final <K extends java.lang.Comparable<? super K>,​V2 extends VTreeMultimap<K,​V2> ofEntries​(java.util.Map.Entry<? extends K,​? extends V2>... entries)
        Creates a TreeMultimap of the given entries. The underlying key comparator is the natural comparator of K.
        Type Parameters:
        K - The key type
        V2 - The value type
        Parameters:
        entries - Multimap entries
        Returns:
        A new TreeMultimap containing the given entries.
      • ofEntries

        @SafeVarargs
        public final <K,​V2 extends VTreeMultimap<K,​V2> ofEntries​(java.util.Comparator<? super K> keyComparator,
                                                                               java.util.Map.Entry<? extends K,​? extends V2>... entries)
        Creates a TreeMultimap of the given entries.
        Type Parameters:
        K - The key type
        V2 - The value type
        Parameters:
        keyComparator - The comparator used to sort the entries by their key.
        entries - Multimap entries
        Returns:
        A new TreeMultimap containing the given entries.
      • ofAll

        public <K,​V2 extends VTreeMultimap<K,​V2> ofAll​(java.util.Comparator<? super K> keyComparator,
                                                                     java.util.Map<? extends K,​? extends V2> map)
        Returns a TreeMultimap, from a source java.util.Map.
        Type Parameters:
        K - The key type
        V2 - The value type
        Parameters:
        map - A map
        keyComparator - The comparator used to sort the entries by their key.
        Returns:
        A new Multimap containing the given map entries
      • ofAll

        public <K extends java.lang.Comparable<? super K>,​V2 extends VTreeMultimap<K,​V2> ofAll​(java.util.Map<? extends K,​? extends V2> map)
        Returns a TreeMultimap, from a source java.util.Map.
        Type Parameters:
        K - The key type
        V2 - The value type
        Parameters:
        map - A map
        Returns:
        A new Multimap containing the given map entries
      • ofAll

        public <T,​K,​V2 extends VTreeMultimap<K,​V2> ofAll​(java.util.Comparator<? super K> keyComparator,
                                                                             java.util.stream.Stream<? extends T> stream,
                                                                             java.util.function.Function<? super T,​? extends K> keyMapper,
                                                                             java.util.function.Function<? super T,​? extends V2> valueMapper)
        Returns a TreeMultimap, from entries mapped from stream.
        Type Parameters:
        T - The stream element type
        K - The key type
        V2 - The value type
        Parameters:
        keyComparator - The comparator used to sort the entries by their key.
        stream - the source stream
        keyMapper - the key mapper
        valueMapper - the value mapper
        Returns:
        A new Multimap
      • ofAll

        public <T,​K extends java.lang.Comparable<? super K>,​V2 extends VTreeMultimap<K,​V2> ofAll​(java.util.stream.Stream<? extends T> stream,
                                                                                                                     java.util.function.Function<? super T,​? extends K> keyMapper,
                                                                                                                     java.util.function.Function<? super T,​? extends V2> valueMapper)
        Returns a TreeMultimap, from entries mapped from stream.
        Type Parameters:
        T - The stream element type
        K - The key type
        V2 - The value type
        Parameters:
        stream - the source stream
        keyMapper - the key mapper
        valueMapper - the value mapper
        Returns:
        A new Multimap
      • ofAll

        public <T,​K,​V2 extends VTreeMultimap<K,​V2> ofAll​(java.util.Comparator<? super K> keyComparator,
                                                                             java.util.stream.Stream<? extends T> stream,
                                                                             java.util.function.Function<? super T,​Tuple2<? extends K,​? extends V2>> entryMapper)
        Returns a TreeMultimap, from entries mapped from stream.
        Type Parameters:
        T - The stream element type
        K - The key type
        V2 - The value type
        Parameters:
        keyComparator - The comparator used to sort the entries by their key.
        stream - the source stream
        entryMapper - the entry mapper
        Returns:
        A new Multimap
      • ofAll

        public <T,​K extends java.lang.Comparable<? super K>,​V2 extends VTreeMultimap<K,​V2> ofAll​(java.util.stream.Stream<? extends T> stream,
                                                                                                                     java.util.function.Function<? super T,​Tuple2<? extends K,​? extends V2>> entryMapper)
        Returns a TreeMultimap, from entries mapped from stream.
        Type Parameters:
        T - The stream element type
        K - The key type
        V2 - The value type
        Parameters:
        stream - the source stream
        entryMapper - the entry mapper
        Returns:
        A new Multimap
      • tabulate

        public <K extends java.lang.Comparable<? super K>,​V2 extends VTreeMultimap<K,​V2> tabulate​(int n,
                                                                                                                java.util.function.Function<? super java.lang.Integer,​? extends Tuple2<? extends K,​? extends V2>> f)
        Returns a TreeMultimap containing n values of a given Function f over a range of integer values from 0 to n - 1. The underlying key comparator is the natural comparator of K.
        Type Parameters:
        K - The key type
        V2 - The value type
        Parameters:
        n - The number of elements in the TreeMultimap
        f - The Function computing element values
        Returns:
        A TreeMultimap consisting of elements f(0),f(1), ..., f(n - 1)
        Throws:
        java.lang.NullPointerException - if f is null
      • tabulate

        public <K,​V2 extends VTreeMultimap<K,​V2> tabulate​(java.util.Comparator<? super K> keyComparator,
                                                                        int n,
                                                                        java.util.function.Function<? super java.lang.Integer,​? extends Tuple2<? extends K,​? extends V2>> f)
        Returns a TreeMultimap containing n values of a given Function f over a range of integer values from 0 to n - 1.
        Type Parameters:
        K - The key type
        V2 - The value type
        Parameters:
        keyComparator - The comparator used to sort the entries by their key
        n - The number of elements in the TreeMultimap
        f - The Function computing element values
        Returns:
        A TreeMultimap consisting of elements f(0),f(1), ..., f(n - 1)
        Throws:
        java.lang.NullPointerException - if keyComparator or f are null
      • fill

        public <K extends java.lang.Comparable<? super K>,​V2 extends VTreeMultimap<K,​V2> fill​(int n,
                                                                                                            java.util.function.Supplier<? extends Tuple2<? extends K,​? extends V2>> s)
        Returns a TreeMultimap containing n values supplied by a given Supplier s. The underlying key comparator is the natural comparator of K.
        Type Parameters:
        K - The key type
        V2 - The value type
        Parameters:
        n - The number of elements in the TreeMultimap
        s - The Supplier computing element values
        Returns:
        A TreeMultimap of size n, where each element contains the result supplied by s.
        Throws:
        java.lang.NullPointerException - if s is null
      • fill

        public <K,​V2 extends VTreeMultimap<K,​V2> fill​(java.util.Comparator<? super K> keyComparator,
                                                                    int n,
                                                                    java.util.function.Supplier<? extends Tuple2<? extends K,​? extends V2>> s)
        Returns a TreeMultimap containing n values supplied by a given Supplier s.
        Type Parameters:
        K - The key type
        V2 - The value type
        Parameters:
        keyComparator - The comparator used to sort the entries by their key
        n - The number of elements in the TreeMultimap
        s - The Supplier computing element values
        Returns:
        A TreeMultimap of size n, where each element contains the result supplied by s.
        Throws:
        java.lang.NullPointerException - if keyComparator or s are null
      • fill

        public <K extends java.lang.Comparable<? super K>,​V2 extends VTreeMultimap<K,​V2> fill​(int n,
                                                                                                            Tuple2<? extends K,​? extends V2> element)
        Returns a TreeMultimap containing n times the given element The underlying key comparator is the natural comparator of K.
        Type Parameters:
        K - The key type
        V2 - The value type
        Parameters:
        n - The number of elements in the TreeMultimap
        element - The element
        Returns:
        A TreeMultimap of size 1, where each element contains n values of element._2.
      • fill

        public <K,​V2 extends VTreeMultimap<K,​V2> fill​(java.util.Comparator<? super K> keyComparator,
                                                                    int n,
                                                                    Tuple2<? extends K,​? extends V2> element)
        Returns a TreeMultimap containing n times the given element
        Type Parameters:
        K - The key type
        V2 - The value type
        Parameters:
        keyComparator - The comparator used to sort the entries by their key
        n - The number of elements in the TreeMultimap
        element - The element
        Returns:
        A TreeMultimap of size 1, where each element contains n values of element._2.
      • of

        public <K extends java.lang.Comparable<? super K>,​V2 extends VTreeMultimap<K,​V2> of​(K key,
                                                                                                          V2 value)
        Creates a TreeMultimap of the given key-value pair.
        Type Parameters:
        K - The key type
        V2 - The value type
        Parameters:
        key - A singleton map key.
        value - A singleton map value.
        Returns:
        A new Multimap containing the given entries
      • of

        public <K extends java.lang.Comparable<? super K>,​V2 extends VTreeMultimap<K,​V2> of​(K k1,
                                                                                                          V2 v1,
                                                                                                          K k2,
                                                                                                          V2 v2)
        Creates a TreeMultimap of the given list of key-value pairs.
        Type Parameters:
        K - The key type
        V2 - The value type
        Parameters:
        k1 - a key for the map
        v1 - the value for k1
        k2 - a key for the map
        v2 - the value for k2
        Returns:
        A new Multimap containing the given entries
      • of

        public <K extends java.lang.Comparable<? super K>,​V2 extends VTreeMultimap<K,​V2> of​(K k1,
                                                                                                          V2 v1,
                                                                                                          K k2,
                                                                                                          V2 v2,
                                                                                                          K k3,
                                                                                                          V2 v3)
        Creates a TreeMultimap of the given list of key-value pairs.
        Type Parameters:
        K - The key type
        V2 - The value type
        Parameters:
        k1 - a key for the map
        v1 - the value for k1
        k2 - a key for the map
        v2 - the value for k2
        k3 - a key for the map
        v3 - the value for k3
        Returns:
        A new Multimap containing the given entries
      • of

        public <K extends java.lang.Comparable<? super K>,​V2 extends VTreeMultimap<K,​V2> of​(K k1,
                                                                                                          V2 v1,
                                                                                                          K k2,
                                                                                                          V2 v2,
                                                                                                          K k3,
                                                                                                          V2 v3,
                                                                                                          K k4,
                                                                                                          V2 v4)
        Creates a TreeMultimap of the given list of key-value pairs.
        Type Parameters:
        K - The key type
        V2 - The value type
        Parameters:
        k1 - a key for the map
        v1 - the value for k1
        k2 - a key for the map
        v2 - the value for k2
        k3 - a key for the map
        v3 - the value for k3
        k4 - a key for the map
        v4 - the value for k4
        Returns:
        A new Multimap containing the given entries
      • of

        public <K extends java.lang.Comparable<? super K>,​V2 extends VTreeMultimap<K,​V2> of​(K k1,
                                                                                                          V2 v1,
                                                                                                          K k2,
                                                                                                          V2 v2,
                                                                                                          K k3,
                                                                                                          V2 v3,
                                                                                                          K k4,
                                                                                                          V2 v4,
                                                                                                          K k5,
                                                                                                          V2 v5)
        Creates a TreeMultimap of the given list of key-value pairs.
        Type Parameters:
        K - The key type
        V2 - The value type
        Parameters:
        k1 - a key for the map
        v1 - the value for k1
        k2 - a key for the map
        v2 - the value for k2
        k3 - a key for the map
        v3 - the value for k3
        k4 - a key for the map
        v4 - the value for k4
        k5 - a key for the map
        v5 - the value for k5
        Returns:
        A new Multimap containing the given entries
      • of

        public <K extends java.lang.Comparable<? super K>,​V2 extends VTreeMultimap<K,​V2> of​(K k1,
                                                                                                          V2 v1,
                                                                                                          K k2,
                                                                                                          V2 v2,
                                                                                                          K k3,
                                                                                                          V2 v3,
                                                                                                          K k4,
                                                                                                          V2 v4,
                                                                                                          K k5,
                                                                                                          V2 v5,
                                                                                                          K k6,
                                                                                                          V2 v6)
        Creates a TreeMultimap of the given list of key-value pairs.
        Type Parameters:
        K - The key type
        V2 - The value type
        Parameters:
        k1 - a key for the map
        v1 - the value for k1
        k2 - a key for the map
        v2 - the value for k2
        k3 - a key for the map
        v3 - the value for k3
        k4 - a key for the map
        v4 - the value for k4
        k5 - a key for the map
        v5 - the value for k5
        k6 - a key for the map
        v6 - the value for k6
        Returns:
        A new Multimap containing the given entries
      • of

        public <K extends java.lang.Comparable<? super K>,​V2 extends VTreeMultimap<K,​V2> of​(K k1,
                                                                                                          V2 v1,
                                                                                                          K k2,
                                                                                                          V2 v2,
                                                                                                          K k3,
                                                                                                          V2 v3,
                                                                                                          K k4,
                                                                                                          V2 v4,
                                                                                                          K k5,
                                                                                                          V2 v5,
                                                                                                          K k6,
                                                                                                          V2 v6,
                                                                                                          K k7,
                                                                                                          V2 v7)
        Creates a TreeMultimap of the given list of key-value pairs.
        Type Parameters:
        K - The key type
        V2 - The value type
        Parameters:
        k1 - a key for the map
        v1 - the value for k1
        k2 - a key for the map
        v2 - the value for k2
        k3 - a key for the map
        v3 - the value for k3
        k4 - a key for the map
        v4 - the value for k4
        k5 - a key for the map
        v5 - the value for k5
        k6 - a key for the map
        v6 - the value for k6
        k7 - a key for the map
        v7 - the value for k7
        Returns:
        A new Multimap containing the given entries
      • of

        public <K extends java.lang.Comparable<? super K>,​V2 extends VTreeMultimap<K,​V2> of​(K k1,
                                                                                                          V2 v1,
                                                                                                          K k2,
                                                                                                          V2 v2,
                                                                                                          K k3,
                                                                                                          V2 v3,
                                                                                                          K k4,
                                                                                                          V2 v4,
                                                                                                          K k5,
                                                                                                          V2 v5,
                                                                                                          K k6,
                                                                                                          V2 v6,
                                                                                                          K k7,
                                                                                                          V2 v7,
                                                                                                          K k8,
                                                                                                          V2 v8)
        Creates a TreeMultimap of the given list of key-value pairs.
        Type Parameters:
        K - The key type
        V2 - The value type
        Parameters:
        k1 - a key for the map
        v1 - the value for k1
        k2 - a key for the map
        v2 - the value for k2
        k3 - a key for the map
        v3 - the value for k3
        k4 - a key for the map
        v4 - the value for k4
        k5 - a key for the map
        v5 - the value for k5
        k6 - a key for the map
        v6 - the value for k6
        k7 - a key for the map
        v7 - the value for k7
        k8 - a key for the map
        v8 - the value for k8
        Returns:
        A new Multimap containing the given entries
      • of

        public <K extends java.lang.Comparable<? super K>,​V2 extends VTreeMultimap<K,​V2> of​(K k1,
                                                                                                          V2 v1,
                                                                                                          K k2,
                                                                                                          V2 v2,
                                                                                                          K k3,
                                                                                                          V2 v3,
                                                                                                          K k4,
                                                                                                          V2 v4,
                                                                                                          K k5,
                                                                                                          V2 v5,
                                                                                                          K k6,
                                                                                                          V2 v6,
                                                                                                          K k7,
                                                                                                          V2 v7,
                                                                                                          K k8,
                                                                                                          V2 v8,
                                                                                                          K k9,
                                                                                                          V2 v9)
        Creates a TreeMultimap of the given list of key-value pairs.
        Type Parameters:
        K - The key type
        V2 - The value type
        Parameters:
        k1 - a key for the map
        v1 - the value for k1
        k2 - a key for the map
        v2 - the value for k2
        k3 - a key for the map
        v3 - the value for k3
        k4 - a key for the map
        v4 - the value for k4
        k5 - a key for the map
        v5 - the value for k5
        k6 - a key for the map
        v6 - the value for k6
        k7 - a key for the map
        v7 - the value for k7
        k8 - a key for the map
        v8 - the value for k8
        k9 - a key for the map
        v9 - the value for k9
        Returns:
        A new Multimap containing the given entries
      • of

        public <K extends java.lang.Comparable<? super K>,​V2 extends VTreeMultimap<K,​V2> of​(K k1,
                                                                                                          V2 v1,
                                                                                                          K k2,
                                                                                                          V2 v2,
                                                                                                          K k3,
                                                                                                          V2 v3,
                                                                                                          K k4,
                                                                                                          V2 v4,
                                                                                                          K k5,
                                                                                                          V2 v5,
                                                                                                          K k6,
                                                                                                          V2 v6,
                                                                                                          K k7,
                                                                                                          V2 v7,
                                                                                                          K k8,
                                                                                                          V2 v8,
                                                                                                          K k9,
                                                                                                          V2 v9,
                                                                                                          K k10,
                                                                                                          V2 v10)
        Creates a TreeMultimap of the given list of key-value pairs.
        Type Parameters:
        K - The key type
        V2 - The value type
        Parameters:
        k1 - a key for the map
        v1 - the value for k1
        k2 - a key for the map
        v2 - the value for k2
        k3 - a key for the map
        v3 - the value for k3
        k4 - a key for the map
        v4 - the value for k4
        k5 - a key for the map
        v5 - the value for k5
        k6 - a key for the map
        v6 - the value for k6
        k7 - a key for the map
        v7 - the value for k7
        k8 - a key for the map
        v8 - the value for k8
        k9 - a key for the map
        v9 - the value for k9
        k10 - a key for the map
        v10 - the value for k10
        Returns:
        A new Multimap containing the given entries
      • of

        public <K extends java.lang.Comparable<? super K>,​V2 extends VTreeMultimap<K,​V2> of​(Tuple2<? extends K,​? extends V2> entry)
        Creates a TreeMultimap of the given list of key-value pairs.
        Type Parameters:
        K - The key type
        V2 - The value type
        Parameters:
        entry - The key-value pair used to form a new TreeMultimap.
        Returns:
        A new Multimap containing the given entry
      • of

        public <K,​V2 extends VTreeMultimap<K,​V2> of​(java.util.Comparator<? super K> keyComparator,
                                                                  K key,
                                                                  V2 value)
        Creates a TreeMultimap of the given key-value pair.
        Type Parameters:
        K - The key type
        V2 - The value type
        Parameters:
        keyComparator - The comparator used to sort the entries by their key.
        key - A singleton map key.
        value - A singleton map value.
        Returns:
        A new Multimap containing the given entry
      • of

        public <K,​V2 extends VTreeMultimap<K,​V2> of​(java.util.Comparator<? super K> keyComparator,
                                                                  K k1,
                                                                  V2 v1,
                                                                  K k2,
                                                                  V2 v2)
        Creates a TreeMultimap of the given list of key-value pairs.
        Type Parameters:
        K - The key type
        V2 - The value type
        Parameters:
        k1 - a key for the map
        v1 - the value for k1
        k2 - a key for the map
        v2 - the value for k2
        keyComparator - The comparator used to sort the entries by their key.
        Returns:
        A new Multimap containing the given entries
      • of

        public <K,​V2 extends VTreeMultimap<K,​V2> of​(java.util.Comparator<? super K> keyComparator,
                                                                  K k1,
                                                                  V2 v1,
                                                                  K k2,
                                                                  V2 v2,
                                                                  K k3,
                                                                  V2 v3)
        Creates a TreeMultimap of the given list of key-value pairs.
        Type Parameters:
        K - The key type
        V2 - The value type
        Parameters:
        k1 - a key for the map
        v1 - the value for k1
        k2 - a key for the map
        v2 - the value for k2
        k3 - a key for the map
        v3 - the value for k3
        keyComparator - The comparator used to sort the entries by their key.
        Returns:
        A new Multimap containing the given entries
      • of

        public <K,​V2 extends VTreeMultimap<K,​V2> of​(java.util.Comparator<? super K> keyComparator,
                                                                  K k1,
                                                                  V2 v1,
                                                                  K k2,
                                                                  V2 v2,
                                                                  K k3,
                                                                  V2 v3,
                                                                  K k4,
                                                                  V2 v4)
        Creates a TreeMultimap of the given list of key-value pairs.
        Type Parameters:
        K - The key type
        V2 - The value type
        Parameters:
        k1 - a key for the map
        v1 - the value for k1
        k2 - a key for the map
        v2 - the value for k2
        k3 - a key for the map
        v3 - the value for k3
        k4 - a key for the map
        v4 - the value for k4
        keyComparator - The comparator used to sort the entries by their key.
        Returns:
        A new Multimap containing the given entries
      • of

        public <K,​V2 extends VTreeMultimap<K,​V2> of​(java.util.Comparator<? super K> keyComparator,
                                                                  K k1,
                                                                  V2 v1,
                                                                  K k2,
                                                                  V2 v2,
                                                                  K k3,
                                                                  V2 v3,
                                                                  K k4,
                                                                  V2 v4,
                                                                  K k5,
                                                                  V2 v5)
        Creates a TreeMultimap of the given list of key-value pairs.
        Type Parameters:
        K - The key type
        V2 - The value type
        Parameters:
        k1 - a key for the map
        v1 - the value for k1
        k2 - a key for the map
        v2 - the value for k2
        k3 - a key for the map
        v3 - the value for k3
        k4 - a key for the map
        v4 - the value for k4
        k5 - a key for the map
        v5 - the value for k5
        keyComparator - The comparator used to sort the entries by their key.
        Returns:
        A new Multimap containing the given entries
      • of

        public <K,​V2 extends VTreeMultimap<K,​V2> of​(java.util.Comparator<? super K> keyComparator,
                                                                  K k1,
                                                                  V2 v1,
                                                                  K k2,
                                                                  V2 v2,
                                                                  K k3,
                                                                  V2 v3,
                                                                  K k4,
                                                                  V2 v4,
                                                                  K k5,
                                                                  V2 v5,
                                                                  K k6,
                                                                  V2 v6)
        Creates a TreeMultimap of the given list of key-value pairs.
        Type Parameters:
        K - The key type
        V2 - The value type
        Parameters:
        k1 - a key for the map
        v1 - the value for k1
        k2 - a key for the map
        v2 - the value for k2
        k3 - a key for the map
        v3 - the value for k3
        k4 - a key for the map
        v4 - the value for k4
        k5 - a key for the map
        v5 - the value for k5
        k6 - a key for the map
        v6 - the value for k6
        keyComparator - The comparator used to sort the entries by their key.
        Returns:
        A new Multimap containing the given entries
      • of

        public <K,​V2 extends VTreeMultimap<K,​V2> of​(java.util.Comparator<? super K> keyComparator,
                                                                  K k1,
                                                                  V2 v1,
                                                                  K k2,
                                                                  V2 v2,
                                                                  K k3,
                                                                  V2 v3,
                                                                  K k4,
                                                                  V2 v4,
                                                                  K k5,
                                                                  V2 v5,
                                                                  K k6,
                                                                  V2 v6,
                                                                  K k7,
                                                                  V2 v7)
        Creates a TreeMultimap of the given list of key-value pairs.
        Type Parameters:
        K - The key type
        V2 - The value type
        Parameters:
        k1 - a key for the map
        v1 - the value for k1
        k2 - a key for the map
        v2 - the value for k2
        k3 - a key for the map
        v3 - the value for k3
        k4 - a key for the map
        v4 - the value for k4
        k5 - a key for the map
        v5 - the value for k5
        k6 - a key for the map
        v6 - the value for k6
        k7 - a key for the map
        v7 - the value for k7
        keyComparator - The comparator used to sort the entries by their key.
        Returns:
        A new Multimap containing the given entries
      • of

        public <K,​V2 extends VTreeMultimap<K,​V2> of​(java.util.Comparator<? super K> keyComparator,
                                                                  K k1,
                                                                  V2 v1,
                                                                  K k2,
                                                                  V2 v2,
                                                                  K k3,
                                                                  V2 v3,
                                                                  K k4,
                                                                  V2 v4,
                                                                  K k5,
                                                                  V2 v5,
                                                                  K k6,
                                                                  V2 v6,
                                                                  K k7,
                                                                  V2 v7,
                                                                  K k8,
                                                                  V2 v8)
        Creates a TreeMultimap of the given list of key-value pairs.
        Type Parameters:
        K - The key type
        V2 - The value type
        Parameters:
        k1 - a key for the map
        v1 - the value for k1
        k2 - a key for the map
        v2 - the value for k2
        k3 - a key for the map
        v3 - the value for k3
        k4 - a key for the map
        v4 - the value for k4
        k5 - a key for the map
        v5 - the value for k5
        k6 - a key for the map
        v6 - the value for k6
        k7 - a key for the map
        v7 - the value for k7
        k8 - a key for the map
        v8 - the value for k8
        keyComparator - The comparator used to sort the entries by their key.
        Returns:
        A new Multimap containing the given entries
      • of

        public <K,​V2 extends VTreeMultimap<K,​V2> of​(java.util.Comparator<? super K> keyComparator,
                                                                  K k1,
                                                                  V2 v1,
                                                                  K k2,
                                                                  V2 v2,
                                                                  K k3,
                                                                  V2 v3,
                                                                  K k4,
                                                                  V2 v4,
                                                                  K k5,
                                                                  V2 v5,
                                                                  K k6,
                                                                  V2 v6,
                                                                  K k7,
                                                                  V2 v7,
                                                                  K k8,
                                                                  V2 v8,
                                                                  K k9,
                                                                  V2 v9)
        Creates a TreeMultimap of the given list of key-value pairs.
        Type Parameters:
        K - The key type
        V2 - The value type
        Parameters:
        k1 - a key for the map
        v1 - the value for k1
        k2 - a key for the map
        v2 - the value for k2
        k3 - a key for the map
        v3 - the value for k3
        k4 - a key for the map
        v4 - the value for k4
        k5 - a key for the map
        v5 - the value for k5
        k6 - a key for the map
        v6 - the value for k6
        k7 - a key for the map
        v7 - the value for k7
        k8 - a key for the map
        v8 - the value for k8
        k9 - a key for the map
        v9 - the value for k9
        keyComparator - The comparator used to sort the entries by their key.
        Returns:
        A new Multimap containing the given entries
      • of

        public <K,​V2 extends VTreeMultimap<K,​V2> of​(java.util.Comparator<? super K> keyComparator,
                                                                  K k1,
                                                                  V2 v1,
                                                                  K k2,
                                                                  V2 v2,
                                                                  K k3,
                                                                  V2 v3,
                                                                  K k4,
                                                                  V2 v4,
                                                                  K k5,
                                                                  V2 v5,
                                                                  K k6,
                                                                  V2 v6,
                                                                  K k7,
                                                                  V2 v7,
                                                                  K k8,
                                                                  V2 v8,
                                                                  K k9,
                                                                  V2 v9,
                                                                  K k10,
                                                                  V2 v10)
        Creates a TreeMultimap of the given list of key-value pairs.
        Type Parameters:
        K - The key type
        V2 - The value type
        Parameters:
        k1 - a key for the map
        v1 - the value for k1
        k2 - a key for the map
        v2 - the value for k2
        k3 - a key for the map
        v3 - the value for k3
        k4 - a key for the map
        v4 - the value for k4
        k5 - a key for the map
        v5 - the value for k5
        k6 - a key for the map
        v6 - the value for k6
        k7 - a key for the map
        v7 - the value for k7
        k8 - a key for the map
        v8 - the value for k8
        k9 - a key for the map
        v9 - the value for k9
        k10 - a key for the map
        v10 - the value for k10
        keyComparator - The comparator used to sort the entries by their key.
        Returns:
        A new Multimap containing the given entries
      • of

        public <K,​V2 extends VTreeMultimap<K,​V2> of​(java.util.Comparator<? super K> keyComparator,
                                                                  Tuple2<? extends K,​? extends V2> entry)
        Returns a singleton TreeMultimap, i.e. a TreeMultimap of one entry using a specific key comparator.
        Type Parameters:
        K - The key type
        V2 - The value type
        Parameters:
        keyComparator - The comparator used to sort the entries by their key.
        entry - A map entry.
        Returns:
        A new TreeMultimap containing the given entry.
      • collector

        public <K extends java.lang.Comparable<? super K>,​V2 extends V> java.util.stream.Collector<Tuple2<K,​V2>,​java.util.ArrayList<Tuple2<K,​V2>>,​TreeMultimap<K,​V2>> collector()
        Returns a Collector which may be used in conjunction with Stream.collect(Collector) to obtain a TreeMultimap.

        The natural comparator is used to compare TreeMultimap keys.

        Type Parameters:
        K - The key type
        V2 - The value type
        Returns:
        A TreeMultimap Collector.
      • collector

        public <K,​V2 extends V> java.util.stream.Collector<Tuple2<K,​V2>,​java.util.ArrayList<Tuple2<K,​V2>>,​TreeMultimap<K,​V2>> collector​(java.util.Comparator<? super K> keyComparator)
        Returns a Collector which may be used in conjunction with Stream.collect(Collector) to obtain a TreeMultimap.
        Type Parameters:
        K - The key type
        V2 - The value type
        Parameters:
        keyComparator - The comparator used to sort the entries by their key.
        Returns:
        A TreeMultimap Collector.