code: public static <T, C extends Collection<T>> Pair<C, C> partition(Iterable<T> values, Predicate<T> partitioner, Supplier<C> collectionsProvider) {
          dbc.precondition(values != null, "cannot partition a null iterable");
          return new PartitionBy<>(partitioner, collectionsProvider, collectionsProvider).apply(values.iterator());
      }
docs: Partitions elements from the iterable into two collections containing
  elements that match the predicate (left side collection) and elements
  that don't (right side collection). E.g:
  <code>partition([1,2,3,4], isOdd) -> ([1,3],[2,4])</code>
  
  @param <T> the element type
  @param <C> the partitioned elements collection type
  @param values the values to be partitioned
  @param partitioner the predicate used to partition values
  @param collectionsProvider a collection supplier used to create both
  elements collection
  @return the two partitioned collections in a pair.