/** * Returns an immutable sorted map containing the given entries, sorted by the natural ordering of * their keys. * * @throws IllegalArgumentException if any two keys are equal according to their natural ordering */ @SuppressWarnings("unchecked") public static <K extends Comparable<? super K>, V> ImmutableSortedMap<K, V> of( K k1, V v1, K k2, V v2, K k3, V v3, K k4, V v4, K k5, V v5) { return ofEntries( entryOf(k1, v1), entryOf(k2, v2), entryOf(k3, v3), entryOf(k4, v4), entryOf(k5, v5)); }
/** * Returns an immutable sorted map containing the given entries, sorted by the natural ordering of * their keys. * * @throws IllegalArgumentException if any two keys are equal according to their natural ordering */ @SuppressWarnings("unchecked") public static <K extends Comparable<? super K>, V> ImmutableSortedMap<K, V> of( K k1, V v1, K k2, V v2, K k3, V v3, K k4, V v4) { return ofEntries(entryOf(k1, v1), entryOf(k2, v2), entryOf(k3, v3), entryOf(k4, v4)); }
/** * Returns an immutable sorted map containing the given entries, sorted by the natural ordering of * their keys. * * @throws IllegalArgumentException if any two keys are equal according to their natural ordering */ @SuppressWarnings("unchecked") public static <K extends Comparable<? super K>, V> ImmutableSortedMap<K, V> of( K k1, V v1, K k2, V v2, K k3, V v3) { return ofEntries(entryOf(k1, v1), entryOf(k2, v2), entryOf(k3, v3)); }
/** * Returns an immutable sorted map containing the given entries, sorted by the natural ordering of * their keys. * * @throws IllegalArgumentException if the two keys are equal according to their natural ordering */ @SuppressWarnings("unchecked") public static <K extends Comparable<? super K>, V> ImmutableSortedMap<K, V> of( K k1, V v1, K k2, V v2) { return ofEntries(entryOf(k1, v1), entryOf(k2, v2)); }
/** * Returns an immutable sorted map containing the given entries, sorted by the natural ordering of * their keys. * * @throws IllegalArgumentException if any two keys are equal according to their natural ordering */ @SuppressWarnings("unchecked") public static <K extends Comparable<? super K>, V> ImmutableSortedMap<K, V> of( K k1, V v1, K k2, V v2, K k3, V v3, K k4, V v4, K k5, V v5) { return ofEntries( entryOf(k1, v1), entryOf(k2, v2), entryOf(k3, v3), entryOf(k4, v4), entryOf(k5, v5)); }
/** * Returns an immutable sorted map containing the given entries, sorted by the natural ordering of * their keys. * * @throws IllegalArgumentException if any two keys are equal according to their natural ordering */ @SuppressWarnings("unchecked") public static <K extends Comparable<? super K>, V> ImmutableSortedMap<K, V> of( K k1, V v1, K k2, V v2, K k3, V v3, K k4, V v4) { return ofEntries(entryOf(k1, v1), entryOf(k2, v2), entryOf(k3, v3), entryOf(k4, v4)); }
/** * Returns an immutable sorted map containing the given entries, sorted by the natural ordering of * their keys. * * @throws IllegalArgumentException if any two keys are equal according to their natural ordering */ @SuppressWarnings("unchecked") public static <K extends Comparable<? super K>, V> ImmutableSortedMap<K, V> of( K k1, V v1, K k2, V v2, K k3, V v3) { return ofEntries(entryOf(k1, v1), entryOf(k2, v2), entryOf(k3, v3)); }
/** * Returns an immutable sorted map containing the given entries, sorted by the natural ordering of * their keys. * * @throws IllegalArgumentException if the two keys are equal according to their natural ordering */ @SuppressWarnings("unchecked") public static <K extends Comparable<? super K>, V> ImmutableSortedMap<K, V> of( K k1, V v1, K k2, V v2) { return ofEntries(entryOf(k1, v1), entryOf(k2, v2)); }
/** * Returns an immutable sorted map containing the given entries, sorted by the natural ordering of * their keys. * * @throws IllegalArgumentException if any two keys are equal according to their natural ordering */ @SuppressWarnings("unchecked") public static <K extends Comparable<? super K>, V> ImmutableSortedMap<K, V> of( K k1, V v1, K k2, V v2, K k3, V v3, K k4, V v4, K k5, V v5) { return ofEntries( entryOf(k1, v1), entryOf(k2, v2), entryOf(k3, v3), entryOf(k4, v4), entryOf(k5, v5)); }
/** * Returns an immutable sorted map containing the given entries, sorted by the * natural ordering of their keys. * * @throws IllegalArgumentException if any two keys are equal according to * their natural ordering */ @SuppressWarnings("unchecked") public static <K extends Comparable<? super K>, V> ImmutableSortedMap<K, V> of(K k1, V v1, K k2, V v2, K k3, V v3) { return fromEntries(Ordering.natural(), false, 3, entryOf(k1, v1), entryOf(k2, v2), entryOf(k3, v3)); }
/** * Returns an immutable sorted map containing the given entries, sorted by the * natural ordering of their keys. * * @throws IllegalArgumentException if any two keys are equal according to * their natural ordering */ @SuppressWarnings("unchecked") public static <K extends Comparable<? super K>, V> ImmutableSortedMap<K, V> of(K k1, V v1, K k2, V v2, K k3, V v3) { return fromEntries(Ordering.natural(), false, 3, entryOf(k1, v1), entryOf(k2, v2), entryOf(k3, v3)); }
/** * Returns an immutable sorted map containing the given entries, sorted by the natural ordering of * their keys. * * @throws IllegalArgumentException if the two keys are equal according to their natural ordering */ @SuppressWarnings("unchecked") public static <K extends Comparable<? super K>, V> ImmutableSortedMap<K, V> of( K k1, V v1, K k2, V v2) { return ofEntries(entryOf(k1, v1), entryOf(k2, v2)); }
/** * Returns an immutable sorted map containing the given entries, sorted by the natural ordering of * their keys. * * @throws IllegalArgumentException if the two keys are equal according to their natural ordering */ @SuppressWarnings("unchecked") public static <K extends Comparable<? super K>, V> ImmutableSortedMap<K, V> of( K k1, V v1, K k2, V v2) { return ofEntries(entryOf(k1, v1), entryOf(k2, v2)); }
/** * Returns an immutable sorted map containing the given entries, sorted by the * natural ordering of their keys. * * @throws IllegalArgumentException if the two keys are equal according to * their natural ordering */ @SuppressWarnings("unchecked") public static <K extends Comparable<? super K>, V> ImmutableSortedMap<K, V> of(K k1, V v1, K k2, V v2) { return fromEntries(Ordering.natural(), false, 2, entryOf(k1, v1), entryOf(k2, v2)); }
/** * Returns an immutable sorted map containing the given entries, sorted by the * natural ordering of their keys. * * @throws IllegalArgumentException if the two keys are equal according to * their natural ordering */ @SuppressWarnings("unchecked") public static <K extends Comparable<? super K>, V> ImmutableSortedMap<K, V> of(K k1, V v1, K k2, V v2) { return fromEntries(Ordering.natural(), false, 2, entryOf(k1, v1), entryOf(k2, v2)); }
/** * Returns an immutable sorted map containing the given entries, sorted by the * natural ordering of their keys. * * @throws IllegalArgumentException if the two keys are equal according to * their natural ordering */ @SuppressWarnings("unchecked") public static <K extends Comparable<? super K>, V> ImmutableSortedMap<K, V> of(K k1, V v1, K k2, V v2) { return fromEntries(Ordering.natural(), false, 2, entryOf(k1, v1), entryOf(k2, v2)); }
/** * Returns an immutable map containing a single entry. */ public static <K extends Comparable<? super K>, V> ImmutableSortedMap<K, V> of(K k1, V v1) { return new ImmutableSortedMap<K, V>( ImmutableList.of(entryOf(k1, v1)), Ordering.natural()); }
/** * Returns an immutable map containing a single entry. */ public static <K extends Comparable<? super K>, V> ImmutableSortedMap<K, V> of(K k1, V v1) { Entry<?, ?>[] entries = { entryOf(k1, v1) }; return new ImmutableSortedMap<K, V>(entries, Ordering.natural()); }
/** * Returns an immutable map containing a single entry. */ public static <K extends Comparable<? super K>, V> ImmutableSortedMap<K, V> of(K k1, V v1) { Entry<?, ?>[] entries = { entryOf(k1, v1) }; return new ImmutableSortedMap<K, V>(entries, Ordering.natural()); }
/** * Returns an immutable map containing a single entry. */ public static <K extends Comparable<? super K>, V> ImmutableSortedMap<K, V> of(K k1, V v1) { Entry<?, ?>[] entries = { entryOf(k1, v1) }; return new ImmutableSortedMap<K, V>(entries, Ordering.natural()); }