code: public static <T, P> PartitionIterable<T> partitionWith(Iterable<T> iterable, Predicate2<? super T, ? super P> predicate, P parameter)
      {
          if (iterable instanceof RichIterable<?>)
          {
              return ((RichIterable<T>) iterable).partitionWith(predicate, parameter);
          }
          if (iterable instanceof ArrayList)
          {
              return ArrayListIterate.partitionWith((ArrayList<T>) iterable, predicate, parameter);
          }
          if (iterable instanceof List)
          {
              return ListIterate.partitionWith((List<T>) iterable, predicate, parameter);
          }
          if (iterable != null)
          {
              return IterableIterate.partitionWith(iterable, predicate, parameter);
          }
          throw new IllegalArgumentException("Cannot perform a partition on null");
      }
docs: Filters a collection into a PartitionIterable based on a predicate.
  <p>
  Example using a Java 8 lambda expression:
  <pre>
  PartitionIterable&lt;Person>&gt newYorkersAndNonNewYorkers =
  Iterate.<b>partitionWith</b>(people, (Person person, String state) -> person.getAddress().getState().getName().equals(state), "New York");
  </pre>
  <p>
  Example using an anonymous inner class:
  <pre>
  PartitionIterable&lt;Person&gt; newYorkersAndNonNewYorkers =
  Iterate.<b>partitionWith</b>(people, new Predicate&lt;Person, String&gt;()
  {
  public boolean value(Person person, String state)
  {
  return person.getAddress().getState().getName().equals(state);
  }
  }, "New York");
  </pre>
  
  @since 5.0.