Class CollectionFactory


  • public class CollectionFactory
    extends java.lang.Object
    A factory for ConcurrentMaps.
    Since:
    5.1
    Author:
    Manik Surtani, Galder ZamarreƱo
    • Constructor Detail

      • CollectionFactory

        public CollectionFactory()
    • Method Detail

      • computeCapacity

        public static int computeCapacity​(int expectedSize)
      • computeCapacity

        public static int computeCapacity​(int expectedSize,
                                          float loadFactor)
      • makeConcurrentMap

        public static <K,​V> java.util.concurrent.ConcurrentMap<K,​V> makeConcurrentMap()
      • makeConcurrentMap

        public static <K,​V> java.util.concurrent.ConcurrentMap<K,​V> makeConcurrentMap​(int initCapacity)
      • makeConcurrentMap

        public static <K,​V> java.util.concurrent.ConcurrentMap<K,​V> makeConcurrentMap​(int initCapacity,
                                                                                                  int concurrencyLevel)
      • makeConcurrentParallelMap

        public static <K,​V> java.util.concurrent.ConcurrentMap<K,​V> makeConcurrentParallelMap​(int initCapacity,
                                                                                                          int concurrencyLevel)
      • makeConcurrentMap

        public static <K,​V> java.util.concurrent.ConcurrentMap<K,​V> makeConcurrentMap​(int initCapacity,
                                                                                                  float loadFactor,
                                                                                                  int concurrencyLevel)
      • makeMap

        public static <K,​V> java.util.Map<K,​V> makeMap()
      • makeMap

        public static <K,​V> java.util.Map<K,​V> makeMap​(int initialCapacity)
      • makeMap

        public static <K,​V> java.util.Map<K,​V> makeMap​(java.util.Map<? extends K,​? extends V> entries)
      • makeLinkedMap

        public static <K,​V> java.util.Map<K,​V> makeLinkedMap​(int initialCapacity,
                                                                         float loadFactor,
                                                                         boolean accessOrder)
      • makeSet

        public static <T> java.util.Set<T> makeSet()
      • makeSet

        public static <T> java.util.Set<T> makeSet​(int initialCapacity)
      • makeConcurrentMap

        @Deprecated
        public static <K,​V> java.util.concurrent.ConcurrentMap<K,​V> makeConcurrentMap​(Equivalence<? super K> keyEq,
                                                                                                  Equivalence<? super V> valueEq)
        Deprecated.
        Since 9.0, please use makeConcurrentMap() instead.
      • makeConcurrentMap

        @Deprecated
        public static <K,​V> java.util.concurrent.ConcurrentMap<K,​V> makeConcurrentMap​(int initCapacity,
                                                                                                  Equivalence<? super K> keyEq,
                                                                                                  Equivalence<? super V> valueEq)
        Deprecated.
        Since 9.0, please use makeConcurrentMap(int) instead.
      • makeConcurrentMap

        @Deprecated
        public static <K,​V> java.util.concurrent.ConcurrentMap<K,​V> makeConcurrentMap​(int initCapacity,
                                                                                                  int concurrencyLevel,
                                                                                                  Equivalence<? super K> keyEq,
                                                                                                  Equivalence<? super V> valueEq)
        Deprecated.
        Since 9.0, please use makeConcurrentMap(int, int) instead.
      • makeConcurrentParallelMap

        @Deprecated
        public static <K,​V> java.util.concurrent.ConcurrentMap<K,​V> makeConcurrentParallelMap​(int initCapacity,
                                                                                                          int concurrencyLevel,
                                                                                                          Equivalence<? super K> keyEq,
                                                                                                          Equivalence<? super V> valueEq)
        Deprecated.
        Since 9.0, please use makeConcurrentParallelMap(int, int) instead.
      • makeConcurrentMap

        @Deprecated
        public static <K,​V> java.util.concurrent.ConcurrentMap<K,​V> makeConcurrentMap​(int initCapacity,
                                                                                                  float loadFactor,
                                                                                                  int concurrencyLevel,
                                                                                                  Equivalence<? super K> keyEq,
                                                                                                  Equivalence<? super V> valueEq)
        Deprecated.
        Since 9.0, please use makeConcurrentMap(int, float, int) instead.
      • makeBoundedConcurrentMap

        public static <K,​V> java.util.concurrent.ConcurrentMap<K,​V> makeBoundedConcurrentMap​(int maxSize)
      • makeMap

        @Deprecated
        public static <K,​V> java.util.Map<K,​V> makeMap​(Equivalence<? super K> keyEq,
                                                                   Equivalence<? super V> valueEq)
        Deprecated.
        Since 9.0, please use makeMap() instead.
      • makeMap

        @Deprecated
        public static <K,​V> java.util.Map<K,​V> makeMap​(int initialCapacity,
                                                                   Equivalence<? super K> keyEq,
                                                                   Equivalence<? super V> valueEq)
        Deprecated.
        Since 9.0, please use makeMap(int) instead.
      • makeMap

        @Deprecated
        public static <K,​V> java.util.Map<K,​V> makeMap​(java.util.Map<? extends K,​? extends V> entries,
                                                                   Equivalence<? super K> keyEq,
                                                                   Equivalence<? super V> valueEq)
        Deprecated.
        Since 9.0, please use makeMap(Map) instead.
      • makeLinkedMap

        @Deprecated
        public static <K,​V> java.util.Map<K,​V> makeLinkedMap​(int initialCapacity,
                                                                         float loadFactor,
                                                                         boolean accessOrder,
                                                                         Equivalence<? super K> keyEq,
                                                                         Equivalence<? super V> valueEq)
        Deprecated.
        Since 9.0, please use makeSet(int) instead.
      • makeSet

        @Deprecated
        public static <T> java.util.Set<T> makeSet​(Equivalence<? super T> entryEq)
        Deprecated.
        Since 9.0, please use makeSet() instead.
      • makeSet

        @Deprecated
        public static <T> java.util.Set<T> makeSet​(int initialCapacity,
                                                   Equivalence<? super T> entryEq)
        Deprecated.
        Since 9.0, please use makeSet(int) instead.
      • makeSet

        @SafeVarargs
        public static <T> java.util.Set<T> makeSet​(T... entries)
        Create a Set backed by the specified array.
        Type Parameters:
        T - type of elements
        Parameters:
        entries - the array by which the list will be backed
        Returns:
        a set view of the specified array