code: public static <T> Iterator<T> cast(Iterator<?> iterator) {
      return iterator == null ? null : new CastingIterator<T>(iterator);
    }
docs: <p>Casts the elements in an iterator in a lazy fashion. Changes to the returned iterator are reflected in the the
  given iterator.</p>
  
  @param <T>      the type parameter
  @param iterator the iterator to cast
  @return the casted iterator or null if the given iterator was null