public class Collections extends Object
| Modifier and Type | Field and Description |
|---|---|
static SortedMap<?,?> |
EMPTY_SORTED_MAP |
static SortedSet<?> |
EMPTY_SORTED_SET |
| Modifier and Type | Method and Description |
|---|---|
static <K,V> SortedMap<K,V> |
emptySortedMap()
Like
Collections.emptyMap(), but returns a sorted map. |
static <E> SortedSet<E> |
emptySortedSet()
Like
Collections.emptySet(), but returns a sorted set. |
static <K,V> SortedMap<K,V> |
singletonSortedMap(K key,
V value)
Like
Collections.singletonMap(Object, Object), but returns a sorted map. |
static <E> SortedSet<E> |
singletonSortedSet(E element)
Like
Collections.singleton(Object), but returns a sorted set. |
public static final SortedSet<?> EMPTY_SORTED_SET
public static final SortedMap<?,?> EMPTY_SORTED_MAP
public static <E> SortedSet<E> emptySortedSet()
Collections.emptySet(), but returns a sorted set.E - a collection typepublic static <K,V> SortedMap<K,V> emptySortedMap()
Collections.emptyMap(), but returns a sorted map.K - the map's key typeV - the map's value typepublic static <E> SortedSet<E> singletonSortedSet(E element)
Collections.singleton(Object), but returns a sorted set.E - element - public static <K,V> SortedMap<K,V> singletonSortedMap(K key, V value)
Collections.singletonMap(Object, Object), but returns a sorted map.K - V - key - value - Copyright © 2004–2014 Paul Ferraro. All rights reserved.