public final class SetFactories extends Object
ListFactories,
StreamFactories,
StringObjectMap| 限定符和类型 | 方法和说明 |
|---|---|
static <T> HashSet<T> |
newHashSet(T... elements) |
static <T> LinkedHashSet<T> |
newLinkedHashSet(T... elements) |
static <T> TreeSet<T> |
newTreeSet(Comparator<T> comparator,
T... elements) |
static <T extends Comparable<T>> |
newTreeSet(T... elements) |
static <T> Set<T> |
newUnmodifiableSet(T... elements) |
static <T> HashSet<T> |
nullSafeNewHashSet(T... elements) |
static <T> LinkedHashSet<T> |
nullSafeNewLinkedHashSet(T... elements) |
static <T> TreeSet<T> |
nullSafeNewTreeSet(Comparator<T> comparator,
T... elements) |
static <T extends Comparable<T>> |
nullSafeNewTreeSet(T... elements) |
@SafeVarargs public static <T> Set<T> newUnmodifiableSet(@Nullable T... elements)
@SafeVarargs public static <T> HashSet<T> newHashSet(@Nullable T... elements)
@SafeVarargs public static <T> LinkedHashSet<T> newLinkedHashSet(@Nullable T... elements)
@SafeVarargs public static <T extends Comparable<T>> TreeSet<T> newTreeSet(@Nullable T... elements)
@SafeVarargs public static <T> TreeSet<T> newTreeSet(Comparator<T> comparator, @Nullable T... elements)
@SafeVarargs public static <T> HashSet<T> nullSafeNewHashSet(@Nullable T... elements)
@SafeVarargs public static <T> LinkedHashSet<T> nullSafeNewLinkedHashSet(@Nullable T... elements)
@SafeVarargs public static <T extends Comparable<T>> TreeSet<T> nullSafeNewTreeSet(@Nullable T... elements)
@SafeVarargs public static <T> TreeSet<T> nullSafeNewTreeSet(Comparator<T> comparator, @Nullable T... elements)
Copyright © 2022. All rights reserved.