Class Fn.Suppliers

  • Enclosing class:
    Fn

    public static final class Fn.Suppliers
    extends Object
    The Class Suppliers.
    • Method Detail

      • ofInstance

        public static <T> Supplier<T> ofInstance​(T instance)
        Returns a supplier that always supplies instance.
        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:
      • ofCharList

        public static Supplier<CharList> ofCharList()
        Of char list.
        Returns:
      • ofByteList

        public static Supplier<ByteList> ofByteList()
        Of byte list.
        Returns:
      • ofShortList

        public static Supplier<ShortList> ofShortList()
        Of short list.
        Returns:
      • ofIntList

        public static Supplier<IntList> ofIntList()
        Of int list.
        Returns:
      • ofLongList

        public static Supplier<LongList> ofLongList()
        Of long list.
        Returns:
      • ofFloatList

        public static Supplier<FloatList> ofFloatList()
        Of float list.
        Returns:
      • ofDoubleList

        public static Supplier<DoubleList> ofDoubleList()
        Of double list.
        Returns:
      • ofList

        public static <T> Supplier<List<T>> ofList()
        Type Parameters:
        T -
        Returns:
      • ofLinkedList

        public static <T> Supplier<LinkedList<T>> ofLinkedList()
        Of linked list.
        Type Parameters:
        T -
        Returns:
      • ofSet

        public static <T> Supplier<Set<T>> ofSet()
        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:
      • ofQueue

        public static <T> Supplier<Queue<T>> ofQueue()
        Type Parameters:
        T -
        Returns:
      • ofDeque

        public static <T> Supplier<Deque<T>> ofDeque()
        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 type
        V - the value type
        Returns:
      • ofLinkedHashMap

        public static <K,​V> Supplier<Map<K,​V>> ofLinkedHashMap()
        Of linked hash map.
        Type Parameters:
        K - the key type
        V - the value type
        Returns:
      • ofIdentityHashMap

        public static <K,​V> Supplier<IdentityHashMap<K,​V>> ofIdentityHashMap()
        Of identity hash map.
        Type Parameters:
        K - the key type
        V - the value type
        Returns:
      • ofSortedMap

        public static <K,​V> Supplier<SortedMap<K,​V>> ofSortedMap()
        Of sorted map.
        Type Parameters:
        K - the key type
        V - the value type
        Returns:
      • ofNavigableMap

        public static <K,​V> Supplier<NavigableMap<K,​V>> ofNavigableMap()
        Of navigable map.
        Type Parameters:
        K - the key type
        V - the value type
        Returns:
      • ofTreeMap

        public static <K,​V> Supplier<TreeMap<K,​V>> ofTreeMap()
        Of tree map.
        Type Parameters:
        K - the key type
        V - the value type
        Returns:
      • ofConcurrentMap

        public static <K,​V> Supplier<ConcurrentMap<K,​V>> ofConcurrentMap()
        Of concurrent map.
        Type Parameters:
        K - the key type
        V - the value type
        Returns:
      • ofConcurrentHashMap

        public static <K,​V> Supplier<ConcurrentHashMap<K,​V>> ofConcurrentHashMap()
        Of concurrent hash map.
        Type Parameters:
        K - the key type
        V - the value type
        Returns:
      • ofBiMap

        public static <K,​V> Supplier<BiMap<K,​V>> ofBiMap()
        Of bi map.
        Type Parameters:
        K - the key type
        V - the value type
        Returns:
      • ofMultiset

        public static <T> Supplier<Multiset<T>> ofMultiset()
        Type Parameters:
        T -
        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 type
        E -
        Returns:
      • ofSetMultimap

        public static <K,​E> Supplier<SetMultimap<K,​E>> ofSetMultimap()
        Of set multimap.
        Type Parameters:
        K - the key type
        E -
        Returns:
      • 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: