Class SortedMaps
- java.lang.Object
-
- com.github.andrewoma.dexx.collection.SortedMaps
-
public class SortedMaps extends java.lang.Object
SortedMaps
is the preferred method of constructing instances ofSortedMap
.TreeMap
is currently constructed in all cases, however this may change in the future.SortedMaps
is preferred for construction as:- It works better in languages that support type inference
- It allows future optimisations (e.g. small maps may be dedicated classes which are then upgraded to
TreeMaps
)
-
-
Constructor Summary
Constructors Modifier Constructor Description private
SortedMaps()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <K extends java.lang.Comparable<? super K>,V>
@NotNull Builder<Pair<K,V>,SortedMap<K,V>>builder()
static <K,V>
@NotNull Builder<Pair<K,V>,SortedMap<K,V>>builder(java.util.Comparator<? super K> comparator)
private static <K extends java.lang.Comparable<? super K>,V>
SortedMap<K,V>construct(Pair<K,V>... pairs)
private static <K,V>
SortedMap<K,V>construct(java.util.Comparator<? super K> comparator, Pair<K,V>... pairs)
static <K extends java.lang.Comparable<? super K>,V>
@NotNull SortedMap<K,V>copyOf(Pair<K,V>[] pairs)
static <K extends java.lang.Comparable<? super K>,V>
@NotNull SortedMap<K,V>copyOf(java.lang.Iterable<Pair<K,V>> iterable)
static <K,V>
@NotNull SortedMap<K,V>copyOf(java.util.Comparator<? super K> comparator, Pair<K,V>[] pairs)
static <K,V>
@NotNull SortedMap<K,V>copyOf(java.util.Comparator<? super K> comparator, java.lang.Iterable<Pair<K,V>> iterable)
static <K,V>
@NotNull SortedMap<K,V>copyOf(java.util.Comparator<? super K> comparator, java.util.Iterator<Pair<K,V>> iterator)
static <K extends java.lang.Comparable<? super K>,V>
@NotNull SortedMap<K,V>copyOf(java.util.Iterator<Pair<K,V>> iterator)
static <K extends java.lang.Comparable<? super K>,V>
@NotNull SortedMap<K,V>copyOfTraversable(Traversable<Pair<K,V>> traversable)
static <K,V>
@NotNull SortedMap<K,V>copyOfTraversable(java.util.Comparator<? super K> comparator, Traversable<Pair<K,V>> traversable)
static <K extends java.lang.Comparable<? super K>,V>
@NotNull BuilderFactory<Pair<K,V>,SortedMap<K,V>>factory()
static <K,V>
@NotNull BuilderFactory<Pair<K,V>,SortedMap<K,V>>factory(java.util.Comparator<? super K> comparator)
static <K extends java.lang.Comparable<? super K>,V>
@NotNull SortedMap<K,V>of()
static <K,V>
@NotNull SortedMap<K,V>of(java.util.Comparator<? super K> comparator)
static <K,V>
@NotNull SortedMap<K,V>of(java.util.Comparator<? super K> comparator, K k, V v)
static <K,V>
@NotNull SortedMap<K,V>of(java.util.Comparator<? super K> comparator, K k1, V v1, K k2, V v2)
static <K,V>
@NotNull SortedMap<K,V>of(java.util.Comparator<? super K> comparator, K k1, V v1, K k2, V v2, K k3, V v3)
static <K,V>
@NotNull SortedMap<K,V>of(java.util.Comparator<? super K> comparator, K k1, V v1, K k2, V v2, K k3, V v3, K k4, V v4)
static <K,V>
@NotNull SortedMap<K,V>of(java.util.Comparator<? super K> comparator, K k1, V v1, K k2, V v2, K k3, V v3, K k4, V v4, K k5, V v5)
static <K extends java.lang.Comparable<? super K>,V>
@NotNull SortedMap<K,V>of(K k, V v)
static <K extends java.lang.Comparable<? super K>,V>
@NotNull SortedMap<K,V>of(K k1, V v1, K k2, V v2)
static <K extends java.lang.Comparable<? super K>,V>
@NotNull SortedMap<K,V>of(K k1, V v1, K k2, V v2, K k3, V v3)
static <K extends java.lang.Comparable<? super K>,V>
@NotNull SortedMap<K,V>of(K k1, V v1, K k2, V v2, K k3, V v3, K k4, V v4)
static <K extends java.lang.Comparable<? super K>,V>
@NotNull SortedMap<K,V>of(K k1, V v1, K k2, V v2, K k3, V v3, K k4, V v4, K k5, V v5)
private static <K,V>
Pair<K,V>p(K k, V v)
-
-
-
Method Detail
-
of
@NotNull public static <K extends java.lang.Comparable<? super K>,V> @NotNull SortedMap<K,V> of()
-
of
@NotNull public static <K extends java.lang.Comparable<? super K>,V> @NotNull SortedMap<K,V> of(K k, V v)
-
of
@NotNull public static <K extends java.lang.Comparable<? super K>,V> @NotNull SortedMap<K,V> of(K k1, V v1, K k2, V v2)
-
of
@NotNull public static <K extends java.lang.Comparable<? super K>,V> @NotNull SortedMap<K,V> of(K k1, V v1, K k2, V v2, K k3, V v3)
-
of
@NotNull public static <K extends java.lang.Comparable<? super K>,V> @NotNull SortedMap<K,V> of(K k1, V v1, K k2, V v2, K k3, V v3, K k4, V v4)
-
of
@NotNull public static <K extends java.lang.Comparable<? super K>,V> @NotNull SortedMap<K,V> of(K k1, V v1, K k2, V v2, K k3, V v3, K k4, V v4, K k5, V v5)
-
of
@NotNull public static <K,V> @NotNull SortedMap<K,V> of(java.util.Comparator<? super K> comparator)
-
of
@NotNull public static <K,V> @NotNull SortedMap<K,V> of(java.util.Comparator<? super K> comparator, K k, V v)
-
of
@NotNull public static <K,V> @NotNull SortedMap<K,V> of(java.util.Comparator<? super K> comparator, K k1, V v1, K k2, V v2)
-
of
@NotNull public static <K,V> @NotNull SortedMap<K,V> of(java.util.Comparator<? super K> comparator, K k1, V v1, K k2, V v2, K k3, V v3)
-
of
@NotNull public static <K,V> @NotNull SortedMap<K,V> of(java.util.Comparator<? super K> comparator, K k1, V v1, K k2, V v2, K k3, V v3, K k4, V v4)
-
of
@NotNull public static <K,V> @NotNull SortedMap<K,V> of(java.util.Comparator<? super K> comparator, K k1, V v1, K k2, V v2, K k3, V v3, K k4, V v4, K k5, V v5)
-
p
private static <K,V> Pair<K,V> p(K k, V v)
-
construct
private static <K,V> SortedMap<K,V> construct(java.util.Comparator<? super K> comparator, Pair<K,V>... pairs)
-
construct
private static <K extends java.lang.Comparable<? super K>,V> SortedMap<K,V> construct(Pair<K,V>... pairs)
-
copyOf
@NotNull public static <K extends java.lang.Comparable<? super K>,V> @NotNull SortedMap<K,V> copyOf(java.lang.Iterable<Pair<K,V>> iterable)
-
copyOf
@NotNull public static <K extends java.lang.Comparable<? super K>,V> @NotNull SortedMap<K,V> copyOf(java.util.Iterator<Pair<K,V>> iterator)
-
copyOf
@NotNull public static <K extends java.lang.Comparable<? super K>,V> @NotNull SortedMap<K,V> copyOf(Pair<K,V>[] pairs)
-
copyOfTraversable
@NotNull public static <K extends java.lang.Comparable<? super K>,V> @NotNull SortedMap<K,V> copyOfTraversable(Traversable<Pair<K,V>> traversable)
-
copyOf
@NotNull public static <K,V> @NotNull SortedMap<K,V> copyOf(java.util.Comparator<? super K> comparator, java.lang.Iterable<Pair<K,V>> iterable)
-
copyOf
@NotNull public static <K,V> @NotNull SortedMap<K,V> copyOf(java.util.Comparator<? super K> comparator, java.util.Iterator<Pair<K,V>> iterator)
-
copyOf
@NotNull public static <K,V> @NotNull SortedMap<K,V> copyOf(java.util.Comparator<? super K> comparator, Pair<K,V>[] pairs)
-
copyOfTraversable
@NotNull public static <K,V> @NotNull SortedMap<K,V> copyOfTraversable(java.util.Comparator<? super K> comparator, Traversable<Pair<K,V>> traversable)
-
factory
@NotNull public static <K extends java.lang.Comparable<? super K>,V> @NotNull BuilderFactory<Pair<K,V>,SortedMap<K,V>> factory()
-
factory
@NotNull public static <K,V> @NotNull BuilderFactory<Pair<K,V>,SortedMap<K,V>> factory(java.util.Comparator<? super K> comparator)
-
builder
@NotNull public static <K extends java.lang.Comparable<? super K>,V> @NotNull Builder<Pair<K,V>,SortedMap<K,V>> builder()
-
-