code: @SuppressWarnings("unchecked")
      public final T[] filter(final T[] objects) {
          final Collection<T> filtered = filter(Arrays.asList(objects));
          try {
              return filtered.toArray((T[]) Array.newInstance(objects
                      .getClass(), filtered.size()));
          } catch (ArrayStoreException ase) {
              Logger log = LoggerFactory.getLogger(Filter.class);
              log.warn("Error converting to array - using default approach", ase);
          }
          return (T[]) filtered.toArray();
      }
docs: Returns a filtered subset of the specified array.
  
  @param objects an array to filter
  @return a filtered array