code: public static <E> Iterator<E> takeWhile(Iterator<E> iterator, Predicate<E> predicate) {
          return new TakeWhileIterator<E>(iterator, predicate);
      }
docs: Creates an iterator yielding values from the source iterator up until the
  passed predicate matches. E.g:
  <code>takeWhile([2, 4, 3, 6], isEven) -> [2, 4]</code>
  
  @param <E> the iterator element type
  @param iterator the source iterator
  @param predicate the predicate to be evaluated
  @return the resulting iterator