Class Fn.Factory

java.lang.Object
com.landawn.abacus.util.Fn.Factory
Direct Known Subclasses:
Fn.IntFunctions
Enclosing class:
Fn

public abstract static class Fn.Factory extends Object
The Class Factory.
  • Method Details

    • ofBooleanArray

      public static IntFunction<boolean[]> ofBooleanArray()
      Of boolean array.
      Returns:
    • ofCharArray

      public static IntFunction<char[]> ofCharArray()
      Of char array.
      Returns:
    • ofByteArray

      public static IntFunction<byte[]> ofByteArray()
      Of byte array.
      Returns:
    • ofShortArray

      public static IntFunction<short[]> ofShortArray()
      Of short array.
      Returns:
    • ofIntArray

      public static IntFunction<int[]> ofIntArray()
      Of int array.
      Returns:
    • ofLongArray

      public static IntFunction<long[]> ofLongArray()
      Of long array.
      Returns:
    • ofFloatArray

      public static IntFunction<float[]> ofFloatArray()
      Of float array.
      Returns:
    • ofDoubleArray

      public static IntFunction<double[]> ofDoubleArray()
      Of double array.
      Returns:
    • ofStringArray

      public static IntFunction<String[]> ofStringArray()
      Of string array.
      Returns:
    • ofObjectArray

      public static IntFunction<Object[]> ofObjectArray()
      Of object array.
      Returns:
    • ofBooleanList

      public static IntFunction<BooleanList> ofBooleanList()
      Of boolean list.
      Returns:
    • ofCharList

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

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

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

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

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

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

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

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

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

      public static <T> IntFunction<Set<T>> ofSet()
      Type Parameters:
      T -
      Returns:
    • ofLinkedHashSet

      public static <T> IntFunction<Set<T>> ofLinkedHashSet()
      Of linked hash set.
      Type Parameters:
      T -
      Returns:
    • ofSortedSet

      public static <T> IntFunction<SortedSet<T>> ofSortedSet()
      Of sorted set.
      Type Parameters:
      T -
      Returns:
    • ofNavigableSet

      public static <T> IntFunction<NavigableSet<T>> ofNavigableSet()
      Of navigable set.
      Type Parameters:
      T -
      Returns:
    • ofTreeSet

      public static <T> IntFunction<TreeSet<T>> ofTreeSet()
      Of tree set.
      Type Parameters:
      T -
      Returns:
    • ofQueue

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

      public static <T> IntFunction<Deque<T>> ofDeque()
      Type Parameters:
      T -
      Returns:
    • ofArrayDeque

      public static <T> IntFunction<ArrayDeque<T>> ofArrayDeque()
      Of array deque.
      Type Parameters:
      T -
      Returns:
    • ofLinkedBlockingQueue

      public static <T> IntFunction<LinkedBlockingQueue<T>> ofLinkedBlockingQueue()
      Type Parameters:
      T -
      Returns:
    • ofArrayBlockingQueue

      public static <T> IntFunction<ArrayBlockingQueue<T>> ofArrayBlockingQueue()
      Type Parameters:
      T -
      Returns:
    • ofLinkedBlockingDeque

      public static <T> IntFunction<LinkedBlockingDeque<T>> ofLinkedBlockingDeque()
      Type Parameters:
      T -
      Returns:
    • ofConcurrentLinkedQueue

      public static <T> IntFunction<ConcurrentLinkedQueue<T>> ofConcurrentLinkedQueue()
      Type Parameters:
      T -
      Returns:
    • ofPriorityQueue

      public static <T> IntFunction<PriorityQueue<T>> ofPriorityQueue()
      Of priority queue.
      Type Parameters:
      T -
      Returns:
    • ofMap

      public static <K, V> IntFunction<Map<K,V>> ofMap()
      Type Parameters:
      K - the key type
      V - the value type
      Returns:
    • ofLinkedHashMap

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

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

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

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

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

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

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

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

      public static <T> IntFunction<Multiset<T>> ofMultiset()
      Type Parameters:
      T -
      Returns:
    • ofLongMultiset

      public static <T> IntFunction<LongMultiset<T>> ofLongMultiset()
      Of long multiset.
      Type Parameters:
      T -
      Returns:
    • ofListMultimap

      public static <K, E> IntFunction<ListMultimap<K,E>> ofListMultimap()
      Of list multimap.
      Type Parameters:
      K - the key type
      E -
      Returns:
    • ofSetMultimap

      public static <K, E> IntFunction<SetMultimap<K,E>> ofSetMultimap()
      Of set multimap.
      Type Parameters:
      K - the key type
      E -
      Returns:
    • ofDisposableArray

      Returns:
      a new created IntFunction whose apply will return the same DisposableObjArray which is defined as a private field.
    • ofDisposableArray

      @Beta @SequentialOnly @Stateful public static <T> IntFunction<NoCachingNoUpdating.DisposableArray<T>> ofDisposableArray(Class<T> componentType)
      Type Parameters:
      T -
      Parameters:
      componentType -
      Returns:
      a new created IntFunction whose apply will return the same DisposableArray which is defined as a private field.
    • ofCollection

      public static <T> IntFunction<? extends Collection<T>> ofCollection(Class<? extends Collection> targetClass)
      Type Parameters:
      T -
      Parameters:
      targetClass -
      Returns:
    • ofMap

      public static <K, V> IntFunction<? extends Map<K,V>> ofMap(Class<? extends Map> targetClass)
      Type Parameters:
      K -
      V -
      Parameters:
      targetClass -
      Returns:
    • registerForCollection

      public static <T extends Collection> boolean registerForCollection(Class<T> targetClass, IntFunction<T> creator)
      Type Parameters:
      T -
      Parameters:
      targetClass -
      creator -
      Returns:
    • registerForMap

      public static <T extends Map> boolean registerForMap(Class<T> targetClass, IntFunction<T> creator)
      Type Parameters:
      T -
      Parameters:
      targetClass -
      creator -
      Returns:
    • ofImmutableList

      @Deprecated public static IntFunction<ImmutableList<?>> ofImmutableList()
      Deprecated.
      unsupported operation.
      Returns:
      Throws:
      UnsupportedOperationException - the unsupported operation exception
    • ofImmutableSet

      @Deprecated public static IntFunction<ImmutableSet<?>> ofImmutableSet()
      Deprecated.
      unsupported operation.
      Returns:
      Throws:
      UnsupportedOperationException - the unsupported operation exception
    • ofImmutableMap

      @Deprecated public static IntFunction<ImmutableMap<?,?>> ofImmutableMap()
      Deprecated.
      unsupported operation.
      Returns:
      Throws:
      UnsupportedOperationException - the unsupported operation exception
    • single

      @Deprecated @SequentialOnly @Stateful public static <T, C extends Collection<T>> IntFunction<? extends C> single(IntFunction<? extends C> supplier)
      Deprecated.
      Type Parameters:
      T -
      C -
      Parameters:
      supplier -
      Returns: