code: public static <T> Collection<T> select(Iterable<T> iterable, Predicate<? super T> predicate)
      {
          if (iterable instanceof MutableCollection)
          {
              return ((MutableCollection<T>) iterable).select(predicate);
          }
          if (iterable instanceof ArrayList)
          {
              return ArrayListIterate.select((ArrayList<T>) iterable, predicate);
          }
          if (iterable instanceof List)
          {
              return ListIterate.select((List<T>) iterable, predicate);
          }
          if (iterable instanceof Collection)
          {
              return IterableIterate.select(
                      iterable,
                      predicate,
                      DefaultSpeciesNewStrategy.INSTANCE.<T>speciesNew((Collection<T>) iterable));
          }
          if (iterable != null)
          {
              return IterableIterate.select(iterable, predicate);
          }
          throw new IllegalArgumentException("Cannot perform a select on null");
      }
docs: Returns a new collection with only the elements that evaluated to true for the specified predicate.
  <p>
  Example using a Java 8 lambda expression:
  <pre>
  Collection&lt;Person&gt; selected =
  Iterate.<b>select</b>(people, person -> person.getAddress().getCity().equals("Metuchen"));
  </pre>
  <p>
  Example using an anonymous inner class:
  <pre>e.g.
  Collection&lt;Person&gt; selected =
  Iterate.<b>select</b>(people, new Predicate&lt;Person&gt;()
  {
  public boolean value(Person person)
  {
  return person.getAddress().getCity().equals("Metuchen");
  }
  });
  </pre>