Package com.landawn.abacus.util
Class Fn.Suppliers
- java.lang.Object
-
- com.landawn.abacus.util.Fn.Suppliers
-
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static <T> Supplier<ArrayDeque<T>>
ofArrayDeque()
Of array deque.static <K,V>
Supplier<BiMap<K,V>>ofBiMap()
Of bi map.static Supplier<BooleanList>
ofBooleanList()
Of boolean list.static Supplier<ByteList>
ofByteList()
Of byte list.static Supplier<CharList>
ofCharList()
Of char list.static <K,V>
Supplier<ConcurrentHashMap<K,V>>ofConcurrentHashMap()
Of concurrent hash map.static <T> Supplier<ConcurrentLinkedQueue<T>>
ofConcurrentLinkedQueue()
Of concurrent linked queue.static <K,V>
Supplier<ConcurrentMap<K,V>>ofConcurrentMap()
Of concurrent map.static <T> Supplier<Deque<T>>
ofDeque()
static Supplier<DoubleList>
ofDoubleList()
Of double list.static Supplier<boolean[]>
ofEmptyBooleanArray()
Of empty boolean array.static Supplier<byte[]>
ofEmptyByteArray()
Of empty byte array.static Supplier<char[]>
ofEmptyCharArray()
Of empty char array.static Supplier<double[]>
ofEmptyDoubleArray()
Of empty double array.static Supplier<float[]>
ofEmptyFloatArray()
Of empty float array.static Supplier<int[]>
ofEmptyIntArray()
Of empty int array.static Supplier<long[]>
ofEmptyLongArray()
Of empty long array.static Supplier<Object[]>
ofEmptyObjectArray()
Of empty object array.static Supplier<short[]>
ofEmptyShortArray()
Of empty short array.static Supplier<String[]>
ofEmptyStringArray()
Of empty string array.static Supplier<FloatList>
ofFloatList()
Of float list.static Supplier<String>
ofGUID()
static <K,V>
Supplier<IdentityHashMap<K,V>>ofIdentityHashMap()
Of identity hash map.static Supplier<ImmutableList<?>>
ofImmutableList()
Deprecated.static Supplier<ImmutableMap<?,?>>
ofImmutableMap()
Deprecated.static Supplier<ImmutableSet<?>>
ofImmutableSet()
Deprecated.static <T> Supplier<T>
ofInstance(T instance)
Returns a supplier that always suppliesinstance
.static Supplier<IntList>
ofIntList()
Of int list.static <T> Supplier<LinkedBlockingQueue<T>>
ofLinkedBlockingQueue()
Of linked blocking queue.static <K,V>
Supplier<Map<K,V>>ofLinkedHashMap()
Of linked hash map.static <T> Supplier<Set<T>>
ofLinkedHashSet()
Of linked hash set.static <T> Supplier<LinkedList<T>>
ofLinkedList()
Of linked list.static <T> Supplier<List<T>>
ofList()
static <K,E>
Supplier<ListMultimap<K,E>>ofListMultimap()
Of list multimap.static Supplier<LongList>
ofLongList()
Of long list.static <T> Supplier<LongMultiset<T>>
ofLongMultiset()
Of long multiset.static <K,V>
Supplier<Map<K,V>>ofMap()
static <T> Supplier<Multiset<T>>
ofMultiset()
static <K,V>
Supplier<NavigableMap<K,V>>ofNavigableMap()
Of navigable map.static <T> Supplier<NavigableSet<T>>
ofNavigableSet()
Of navigable set.static <T> Supplier<PriorityQueue<T>>
ofPriorityQueue()
Of priority queue.static <T> Supplier<Queue<T>>
ofQueue()
static <T> Supplier<Set<T>>
ofSet()
static <K,E>
Supplier<SetMultimap<K,E>>ofSetMultimap()
Of set multimap.static Supplier<ShortList>
ofShortList()
Of short list.static <K,V>
Supplier<SortedMap<K,V>>ofSortedMap()
Of sorted map.static <T> Supplier<SortedSet<T>>
ofSortedSet()
Of sorted set.static Supplier<StringBuilder>
ofStringBuilder()
Of string builder.static <K,V>
Supplier<TreeMap<K,V>>ofTreeMap()
Of tree map.static <T> Supplier<TreeSet<T>>
ofTreeSet()
Of tree set.static Supplier<String>
ofUUID()
static <T,C extends Collection<T>>
Supplier<? extends C>single(Supplier<? extends C> supplier)
Deprecated.
-
-
-
Method Detail
-
ofInstance
public static <T> Supplier<T> ofInstance(T instance)
Returns a supplier that always suppliesinstance
.- Type Parameters:
T
-- Parameters:
instance
-- Returns:
-
ofEmptyBooleanArray
public static Supplier<boolean[]> ofEmptyBooleanArray()
Of empty boolean array.- Returns:
-
ofEmptyCharArray
public static Supplier<char[]> ofEmptyCharArray()
Of empty char array.- Returns:
-
ofEmptyByteArray
public static Supplier<byte[]> ofEmptyByteArray()
Of empty byte array.- Returns:
-
ofEmptyShortArray
public static Supplier<short[]> ofEmptyShortArray()
Of empty short array.- Returns:
-
ofEmptyIntArray
public static Supplier<int[]> ofEmptyIntArray()
Of empty int array.- Returns:
-
ofEmptyLongArray
public static Supplier<long[]> ofEmptyLongArray()
Of empty long array.- Returns:
-
ofEmptyFloatArray
public static Supplier<float[]> ofEmptyFloatArray()
Of empty float array.- Returns:
-
ofEmptyDoubleArray
public static Supplier<double[]> ofEmptyDoubleArray()
Of empty double array.- Returns:
-
ofEmptyStringArray
public static Supplier<String[]> ofEmptyStringArray()
Of empty string array.- Returns:
-
ofEmptyObjectArray
public static Supplier<Object[]> ofEmptyObjectArray()
Of empty object array.- Returns:
-
ofBooleanList
public static Supplier<BooleanList> ofBooleanList()
Of boolean list.- Returns:
-
ofDoubleList
public static Supplier<DoubleList> ofDoubleList()
Of double list.- Returns:
-
ofLinkedList
public static <T> Supplier<LinkedList<T>> ofLinkedList()
Of linked list.- Type Parameters:
T
-- Returns:
-
ofLinkedHashSet
public static <T> Supplier<Set<T>> ofLinkedHashSet()
Of linked hash set.- Type Parameters:
T
-- Returns:
-
ofSortedSet
public static <T> Supplier<SortedSet<T>> ofSortedSet()
Of sorted set.- Type Parameters:
T
-- Returns:
-
ofNavigableSet
public static <T> Supplier<NavigableSet<T>> ofNavigableSet()
Of navigable set.- Type Parameters:
T
-- Returns:
-
ofTreeSet
public static <T> Supplier<TreeSet<T>> ofTreeSet()
Of tree set.- Type Parameters:
T
-- Returns:
-
ofArrayDeque
public static <T> Supplier<ArrayDeque<T>> ofArrayDeque()
Of array deque.- Type Parameters:
T
-- Returns:
-
ofLinkedBlockingQueue
public static <T> Supplier<LinkedBlockingQueue<T>> ofLinkedBlockingQueue()
Of linked blocking queue.- Type Parameters:
T
-- Returns:
-
ofConcurrentLinkedQueue
public static <T> Supplier<ConcurrentLinkedQueue<T>> ofConcurrentLinkedQueue()
Of concurrent linked queue.- Type Parameters:
T
-- Returns:
-
ofPriorityQueue
public static <T> Supplier<PriorityQueue<T>> ofPriorityQueue()
Of priority queue.- Type Parameters:
T
-- Returns:
-
ofMap
public static <K,V> Supplier<Map<K,V>> ofMap()
- Type Parameters:
K
- the key typeV
- the value type- Returns:
-
ofLinkedHashMap
public static <K,V> Supplier<Map<K,V>> ofLinkedHashMap()
Of linked hash map.- Type Parameters:
K
- the key typeV
- the value type- Returns:
-
ofIdentityHashMap
public static <K,V> Supplier<IdentityHashMap<K,V>> ofIdentityHashMap()
Of identity hash map.- Type Parameters:
K
- the key typeV
- the value type- Returns:
-
ofSortedMap
public static <K,V> Supplier<SortedMap<K,V>> ofSortedMap()
Of sorted map.- Type Parameters:
K
- the key typeV
- the value type- Returns:
-
ofNavigableMap
public static <K,V> Supplier<NavigableMap<K,V>> ofNavigableMap()
Of navigable map.- Type Parameters:
K
- the key typeV
- the value type- Returns:
-
ofTreeMap
public static <K,V> Supplier<TreeMap<K,V>> ofTreeMap()
Of tree map.- Type Parameters:
K
- the key typeV
- the value type- Returns:
-
ofConcurrentMap
public static <K,V> Supplier<ConcurrentMap<K,V>> ofConcurrentMap()
Of concurrent map.- Type Parameters:
K
- the key typeV
- the value type- Returns:
-
ofConcurrentHashMap
public static <K,V> Supplier<ConcurrentHashMap<K,V>> ofConcurrentHashMap()
Of concurrent hash map.- Type Parameters:
K
- the key typeV
- the value type- Returns:
-
ofBiMap
public static <K,V> Supplier<BiMap<K,V>> ofBiMap()
Of bi map.- Type Parameters:
K
- the key typeV
- the value type- Returns:
-
ofLongMultiset
public static <T> Supplier<LongMultiset<T>> ofLongMultiset()
Of long multiset.- Type Parameters:
T
-- Returns:
-
ofListMultimap
public static <K,E> Supplier<ListMultimap<K,E>> ofListMultimap()
Of list multimap.- Type Parameters:
K
- the key typeE
-- Returns:
-
ofSetMultimap
public static <K,E> Supplier<SetMultimap<K,E>> ofSetMultimap()
Of set multimap.- Type Parameters:
K
- the key typeE
-- Returns:
-
ofStringBuilder
public static Supplier<StringBuilder> ofStringBuilder()
Of string builder.- Returns:
-
ofImmutableList
@Deprecated public static Supplier<ImmutableList<?>> ofImmutableList()
Deprecated.- Returns:
- Throws:
UnsupportedOperationException
- the unsupported operation exception
-
ofImmutableSet
@Deprecated public static Supplier<ImmutableSet<?>> ofImmutableSet()
Deprecated.- Returns:
- Throws:
UnsupportedOperationException
- the unsupported operation exception
-
ofImmutableMap
@Deprecated public static Supplier<ImmutableMap<?,?>> ofImmutableMap()
Deprecated.- Returns:
- Throws:
UnsupportedOperationException
- the unsupported operation exception
-
single
@Deprecated public static <T,C extends Collection<T>> Supplier<? extends C> single(Supplier<? extends C> supplier)
Deprecated.- Type Parameters:
T
-C
-- Parameters:
supplier
-- Returns:
-
-