collections.
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| private static int | |
| public static <T> List | |
| public static <K, V> Map | |
| public static <T> Set | |
| public static <T> ArrayList | |
| public static <T> ArrayList | Returns: a newArrayList containing those elementsthe initial elements that the list should contain, in order. May not be initial)null but may
contain null values.Creates a mutable |
| public static <K, V> HashMap | |
| public static <K, V> HashMap | Returns: a newHashMap containing those elementsthe entries that should be contained in the map. May not be initial)null but may contain
null keys or values.Creates a mutable |
| public static <T> HashSet | |
| public static <T> HashSet | Returns: a newHashSet containing those elementsthe initial elements that the set should contain, in order. May not be initial)null but may
contain null values.Creates a mutable |
| public static <T> List | Returns: an immutable list containing the given elements.the elements that should be contained in the list. May not be elements)null or contain any
null values.Returns an immutable list containing the given elements, in order. |
| public static <K, V> Map | Returns: an immutable map containing the given entries.the entries that should be contained in the map. May not be entries)null and may
not contain any null keys or values.Returns an immutable map containing the given entries. |
| public static <T> Set | Returns: an immutable set containing the given elements.the elements that should be contained in the set. May not be elements)null or contain any
null values.Returns an immutable set containing the given elements. |
| public static <K, V> LinkedHashMap | |
| public static <K, V> LinkedHashMap | Returns: a newLinkedHashMap containing those elementsthe entries that should be contained in the map. May not be initial)null but may contain
null keys or values.Creates a mutable |
| public static <T> LinkedHashSet | |
| public static <T> LinkedHashSet | Returns: a newLinkedHashSet containing those elementsthe initial elements that the set should contain, in order. May not be initial)null but may
contain null values.Creates a mutable |
| public static <T> LinkedList | |
| public static <T> LinkedList | Returns: a newLinkedList containing those elementsthe initial elements that the list should contain, in order. May not be initial)null but may
contain null values.Creates a mutable |
| public static <K, V> TreeMap | Returns: a newTreeMapthe comparator that should be used. May be comparator)null which indicates that the natural ordering
of the keys should be used.Creates an empty mutable |
| public static <K, V> TreeMap | Returns: a newTreeMap containing those elementsthe comparator that should be used. May be comparator, Pair<? extends K, ? extends V>... null which indicates that the natural ordering
of the keys should be used.the entries that should be contained in the map. May not be initial)null but may contain
null keys or values.Creates a mutable |
| public static <T> TreeSet | Returns: a newTreeSetthe comparator that should be used. May be comparator)null which indicates that the natural ordering
of the items should be used.Creates an empty mutable |
| public static <T> TreeSet | Returns: a newTreeSet containing those elementsthe comparator that should be used. May be comparator, T... null which indicates that the natural ordering
of the items should be used.the initial elements that the set should contain, in order. May not be initial)null but may
contain null values.Creates a mutable |
| private static <K, V> void |
| CollectionLiterals | back to summary |
|---|---|
| public CollectionLiterals() | |
| capacity | back to summary |
|---|---|
| private static int capacity(int initialSize) | |
| emptyList | back to summary |
|---|---|
| public static <T> List Returns the empty, immutable list.
| |
| emptyMap | back to summary |
|---|---|
| public static <K, V> Map Returns the empty, immutable map.
| |
| emptySet | back to summary |
|---|---|
| public static <T> Set Returns the empty, immutable set.
| |
| newArrayList | back to summary |
|---|---|
| public static <T> ArrayList Creates an empty mutable | |
| newArrayList | back to summary |
|---|---|
| public static <T> ArrayList Creates a mutable | |
| newHashMap | back to summary |
|---|---|
| public static <K, V> HashMap Creates an empty mutable | |
| newHashMap | back to summary |
|---|---|
| public static <K, V> HashMap Creates a mutable
| |
| newHashSet | back to summary |
|---|---|
| public static <T> HashSet Creates an empty mutable | |
| newHashSet | back to summary |
|---|---|
| public static <T> HashSet Creates a mutable | |
| newImmutableList | back to summary |
|---|---|
| public static <T> List Returns an immutable list containing the given elements, in order.
| |
| newImmutableMap | back to summary |
|---|---|
| public static <K, V> Map Returns an immutable map containing the given entries. Repeated occurrences of a keys will cause an
| |
| newImmutableSet | back to summary |
|---|---|
| public static <T> Set Returns an immutable set containing the given elements. Repeated occurrences of an element (according to
| |
| newLinkedHashMap | back to summary |
|---|---|
| public static <K, V> LinkedHashMap Creates an empty mutable
| |
| newLinkedHashMap | back to summary |
|---|---|
| public static <K, V> LinkedHashMap Creates a mutable
| |
| newLinkedHashSet | back to summary |
|---|---|
| public static <T> LinkedHashSet Creates an empty mutable
| |
| newLinkedHashSet | back to summary |
|---|---|
| public static <T> LinkedHashSet Creates a mutable
| |
| newLinkedList | back to summary |
|---|---|
| public static <T> LinkedList Creates an empty mutable
| |
| newLinkedList | back to summary |
|---|---|
| public static <T> LinkedList Creates a mutable
| |
| newTreeMap | back to summary |
|---|---|
| public static <K, V> TreeMap Creates an empty mutable
| |
| newTreeMap | back to summary |
|---|---|
| public static <K, V> TreeMap Creates a mutable
| |
| newTreeSet | back to summary |
|---|---|
| public static <T> TreeSet Creates an empty mutable
| |
| newTreeSet | back to summary |
|---|---|
| public static <T> TreeSet Creates a mutable
| |
| putAll | back to summary |
|---|---|
private static <K, V> void putAll(Map<K, V> result, Pair<? extends K, ? extends V>... entries)
| |