public final class Guavas extends Object
| 限定符和类型 | 方法和说明 |
|---|---|
static <E> List<E> |
newArrayList()
新建数组链表
|
static <E> List<E> |
newArrayList(Collection<E> collection)
新建collection链表
|
static <E> List<E> |
newArrayList(E... elems)
新建数组链表
|
static <E> List<E> |
newArrayList(int size)
新建数组链表
|
static <K,V> Map<K,V> |
newConcurrentHashMap()
新建 ConcurrentHashMap
|
static <K,V> Map<K,V> |
newHashMap()
新建 hash Map
|
static <K,V> Map<K,V> |
newHashMap(int size)
新建 hash Map
|
static <E> Set<E> |
newHashSet()
新建 hash set
|
static <E> Set<E> |
newHashSet(int size)
新建 hash set
|
static <K,V> Map<K,V> |
newLinkedHashMap()
新建 LinkedHashMap
|
static <K,V> Map<K,V> |
newLinkedHashMap(int size)
新建 LinkedHashMap
|
public static <E> List<E> newArrayList()
E - 元素public static <E> List<E> newArrayList(int size)
E - 元素size - 大小public static <E> List<E> newArrayList(E... elems)
E - 元素elems - 元素数组public static <E> List<E> newArrayList(Collection<E> collection)
E - 元素collection - 集合元素public static <K,V> Map<K,V> newHashMap()
K - keyV - valuepublic static <K,V> Map<K,V> newHashMap(int size)
K - keyV - valuesize - 大小public static <K,V> Map<K,V> newConcurrentHashMap()
K - keyV - valuepublic static <K,V> Map<K,V> newLinkedHashMap()
K - keyV - valuepublic static <K,V> Map<K,V> newLinkedHashMap(int size)
K - keyV - valuesize - 大小public static <E> Set<E> newHashSet()
E - 元素public static <E> Set<E> newHashSet(int size)
E - 元素size - 大小Copyright © 2024. All rights reserved.