code: public <T> Collection<T> speciesNew(Collection<?> collection, int size)
      {
          if (size < 0)
          {
              throw new IllegalArgumentException("size may not be < 0 but was " + size);
          }
  
          if (collection instanceof Proxy
                  || collection instanceof PriorityQueue
                  || collection instanceof PriorityBlockingQueue
                  || collection instanceof SortedSet)
          {
              return DefaultSpeciesNewStrategy.createNewInstanceForCollectionType(collection);
          }
          Constructor<?> constructor = ReflectionHelper.getConstructor(collection.getClass(), SIZE_CONSTRUCTOR_TYPES);
          if (constructor != null)
          {
              return (Collection<T>) ReflectionHelper.newInstance(constructor, size);
          }
          return this.speciesNew(collection);
      }
docs: Creates a new instance of a collection based on the class type of collection and specified initial capacity,
  not on the type of objects the collections contains.
  e.g.  CollectionFactory.<Integer>speciesNew(hashSetOfString, 20) returns a new HashSet<Integer>(20);
  e.g.  CollectionFactory.<Date>speciesNew(linkedListOfWombles, 42) returns a new LinkedList<Date>(42);