public static <T, P> int countWith(
            Iterator<T> iterator,
            Predicate2<? super T, ? super P> predicate,
            P parameter)
    {
        int count = 0;
        while (iterator.hasNext())
        {
            if (predicate.accept(iterator.next(), parameter))
            {
                count++;
            }
        }
        return count;
    }
public static < T , P > int countWith ( Iterator < T > iterator , Predicate2 < ? super T , ? super P > predicate , P parameter ) { int count = 0 ; while ( iterator . hasNext ( ) ) { if ( predicate . accept ( iterator . next ( ) , parameter ) ) { count ++ ; } } return count ; }
@see Iterate#countWith(Iterable, Predicate2, Object)