code: public static <E> ImmutableIterator<E> makeImmutable(final Iterator<E> iterator) {
          return new ImmutableIterator<E>() {
              @Override
              public boolean hasNext() {
                  return iterator.hasNext();
              }
  
              @Override
              public E next() {
                  return iterator.next();
              }
          };
      }
docs: Make an iterator immutable.
  
  @param iterator the iterator
  @param <E>      the type the iterator returns
  @return an immutable iterator