/** * Creates an empty {@code TreeMultimap} ordered by the natural ordering of its keys and values. */ public static <K extends Comparable, V extends Comparable> TreeMultimap<K, V> create() { return new TreeMultimap<>(Ordering.natural(), Ordering.natural()); }
/** * Creates an empty {@code TreeMultimap} instance using explicit comparators. Neither comparator * may be null; use {@link Ordering#natural()} to specify natural order. * * @param keyComparator the comparator that determines the key ordering * @param valueComparator the comparator that determines the value ordering */ public static <K, V> TreeMultimap<K, V> create( Comparator<? super K> keyComparator, Comparator<? super V> valueComparator) { return new TreeMultimap<>(checkNotNull(keyComparator), checkNotNull(valueComparator)); }
/** * Constructs a {@code TreeMultimap}, ordered by the natural ordering of its keys and values, with * the same mappings as the specified multimap. * * @param multimap the multimap whose contents are copied to this multimap */ public static <K extends Comparable, V extends Comparable> TreeMultimap<K, V> create( Multimap<? extends K, ? extends V> multimap) { return new TreeMultimap<>(Ordering.natural(), Ordering.natural(), multimap); }
/** * Constructs a {@code TreeMultimap}, ordered by the natural ordering of its keys and values, with * the same mappings as the specified multimap. * * @param multimap the multimap whose contents are copied to this multimap */ public static <K extends Comparable, V extends Comparable> TreeMultimap<K, V> create( Multimap<? extends K, ? extends V> multimap) { return new TreeMultimap<>(Ordering.natural(), Ordering.natural(), multimap); }
/** * Creates an empty {@code TreeMultimap} ordered by the natural ordering of its keys and values. */ public static <K extends Comparable, V extends Comparable> TreeMultimap<K, V> create() { return new TreeMultimap<>(Ordering.natural(), Ordering.natural()); }
/** * Creates an empty {@code TreeMultimap} instance using explicit comparators. Neither comparator * may be null; use {@link Ordering#natural()} to specify natural order. * * @param keyComparator the comparator that determines the key ordering * @param valueComparator the comparator that determines the value ordering */ public static <K, V> TreeMultimap<K, V> create( Comparator<? super K> keyComparator, Comparator<? super V> valueComparator) { return new TreeMultimap<>(checkNotNull(keyComparator), checkNotNull(valueComparator)); }
/** * Creates an empty {@code TreeMultimap} instance using explicit comparators. Neither comparator * may be null; use {@link Ordering#natural()} to specify natural order. * * @param keyComparator the comparator that determines the key ordering * @param valueComparator the comparator that determines the value ordering */ public static <K, V> TreeMultimap<K, V> create( Comparator<? super K> keyComparator, Comparator<? super V> valueComparator) { return new TreeMultimap<>(checkNotNull(keyComparator), checkNotNull(valueComparator)); }
/** * Constructs a {@code TreeMultimap}, ordered by the natural ordering of its keys and values, with * the same mappings as the specified multimap. * * @param multimap the multimap whose contents are copied to this multimap */ public static <K extends Comparable, V extends Comparable> TreeMultimap<K, V> create( Multimap<? extends K, ? extends V> multimap) { return new TreeMultimap<>(Ordering.natural(), Ordering.natural(), multimap); }
/** * Creates an empty {@code TreeMultimap} ordered by the natural ordering of its keys and values. */ public static <K extends Comparable, V extends Comparable> TreeMultimap<K, V> create() { return new TreeMultimap<>(Ordering.natural(), Ordering.natural()); }
/** * Creates an empty {@code TreeMultimap} instance using the natural ordering * of keys and values. If the supplied multimap contains duplicate key-value * pairs, those duplicate pairs will only be stored once in the new multimap. * * @return a newly-created, initially-empty {@code TreeMultimap} */ @SuppressWarnings("unchecked") // allow ungenerified Comparable types public static <K extends Comparable, V extends Comparable> TreeMultimap<K, V> newTreeMultimap() { return new TreeMultimap<K, V>(); }
/** * Constructs a {@code TreeMultimap}, ordered by the natural ordering of its * keys and values, with the same mappings as the specified multimap. * * @param multimap the multimap whose contents are copied to this multimap */ @SuppressWarnings("unchecked") // eclipse doesn't like the raw Comparable public static <K extends Comparable, V extends Comparable> TreeMultimap<K, V> create(Multimap<? extends K, ? extends V> multimap) { return new TreeMultimap<K, V>(Ordering.natural(), Ordering.natural(), multimap); }
/** * Creates an empty {@code TreeMultimap} instance using explicit comparators. Neither comparator * may be null; use {@link Ordering#natural()} to specify natural order. * * @param keyComparator the comparator that determines the key ordering * @param valueComparator the comparator that determines the value ordering */ public static <K, V> TreeMultimap<K, V> create( Comparator<? super K> keyComparator, Comparator<? super V> valueComparator) { return new TreeMultimap<>(checkNotNull(keyComparator), checkNotNull(valueComparator)); }
/** * Constructs a {@code TreeMultimap}, ordered by the natural ordering of its keys and values, with * the same mappings as the specified multimap. * * @param multimap the multimap whose contents are copied to this multimap */ public static <K extends Comparable, V extends Comparable> TreeMultimap<K, V> create( Multimap<? extends K, ? extends V> multimap) { return new TreeMultimap<>(Ordering.natural(), Ordering.natural(), multimap); }
/** * Constructs a {@code TreeMultimap}, ordered by the natural ordering of its * keys and values, with the same mappings as the specified multimap. * * @param multimap the multimap whose contents are copied to this multimap */ @SuppressWarnings("unchecked") // eclipse doesn't like the raw Comparable public static <K extends Comparable, V extends Comparable> TreeMultimap<K, V> create(Multimap<? extends K, ? extends V> multimap) { return new TreeMultimap<K, V>(Ordering.natural(), Ordering.natural(), multimap); }
/** * Creates an empty {@code TreeMultimap} ordered by the natural ordering of * its keys and values. */ @SuppressWarnings("unchecked") // eclipse doesn't like the raw Comparable public static <K extends Comparable, V extends Comparable> TreeMultimap<K, V> create() { return new TreeMultimap<K, V>(Ordering.natural(), Ordering.natural()); }
/** * Creates an empty {@code TreeMultimap} ordered by the natural ordering of * its keys and values. */ public static <K extends Comparable, V extends Comparable> TreeMultimap<K, V> create() { return new TreeMultimap<K, V>(Ordering.natural(), Ordering.natural()); }
/** * Constructs a {@code TreeMultimap}, ordered by the natural ordering of its * keys and values, with the same mappings as the specified multimap. * * @param multimap the multimap whose contents are copied to this multimap */ public static <K extends Comparable, V extends Comparable> TreeMultimap<K, V> create(Multimap<? extends K, ? extends V> multimap) { return new TreeMultimap<K, V>(Ordering.natural(), Ordering.natural(), multimap); }
/** * Constructs a {@code TreeMultimap}, ordered by the natural ordering of its * keys and values, with the same mappings as the specified multimap. * * @param multimap the multimap whose contents are copied to this multimap */ public static <K extends Comparable, V extends Comparable> TreeMultimap<K, V> create(Multimap<? extends K, ? extends V> multimap) { return new TreeMultimap<K, V>(Ordering.natural(), Ordering.natural(), multimap); }
/** * Creates an empty {@code TreeMultimap} ordered by the natural ordering of * its keys and values. */ @SuppressWarnings("unchecked") // eclipse doesn't like the raw Comparable public static <K extends Comparable, V extends Comparable> TreeMultimap<K, V> create() { return new TreeMultimap<K, V>(Ordering.natural(), Ordering.natural()); }
/** * Constructs a {@code TreeMultimap}, ordered by the natural ordering of its * keys and values, with the same mappings as the specified multimap. * * @param multimap the multimap whose contents are copied to this multimap */ public static <K extends Comparable, V extends Comparable> TreeMultimap<K, V> create( Multimap<? extends K, ? extends V> multimap) { return new TreeMultimap<K, V>(Ordering.natural(), Ordering.natural(), multimap); }