@SuppressWarnings("unchecked") // can cast to <T> because non-Ts are removed
  @GwtIncompatible // Class.isInstance
  public static <T> UnmodifiableIterator<T> filter(Iterator<?> unfiltered, Class<T> desiredType) {
    return (UnmodifiableIterator<T>) filter(unfiltered, instanceOf(desiredType));
  }
@SuppressWarnings("unchecked") 
  @GwtIncompatible 
  public static <T> UnmodifiableIterator<T> filter(Iterator<?> unfiltered, Class<T> desiredType) {
    return (UnmodifiableIterator<T>) filter(unfiltered, instanceOf(desiredType));
  }
@ SuppressWarnings ( "unchecked" ) // can cast to <T> because non-Ts are removed @ GwtIncompatible // Class.isInstance public static < T > UnmodifiableIterator < T > filter ( Iterator < ? > unfiltered , Class < T > desiredType ) { return ( UnmodifiableIterator < T > ) filter ( unfiltered , instanceOf ( desiredType ) ) ; }
Returns a view of {@code unfiltered} containing all elements that are of the type {@code
desiredType}.
Returns a view of {