code: public static <T> Iterator<T> takeWhile(final Iterator<? extends T> iterator, final Function1<? super T, Boolean> predicate) {
  		if (iterator == null)
  			throw new NullPointerException("iterator");
  		if (predicate == null)
  			throw new NullPointerException("predicate");
  		return new AbstractIterator<T>() {
  			@Override
  			protected T computeNext() {
  				if (!iterator.hasNext())
  					return endOfData();
  				T next = iterator.next();
  				if (predicate.apply(next)) {
  					return next;
  				} else {
  					return endOfData();
  				}
  			}
  		};
  	}
docs: Returns an Iterator containing all elements starting from the head of the source up to and excluding the first
  element that violates the predicate. The resulting Iterator is a lazily computed view, so any modifications to the
  underlying Iterators will be reflected on iteration. The result does not support {@link Iterator#remove()}
  
  @param iterator
  the elements from which to take. May not be <code>null</code>.
  @param predicate
  the predicate which decides whether to keep taking elements. May not be <code>null</code>.
  @return the taken elements
  @since 2.7