code: public static <T> ObjIterator<T> limit(final Iterator<T> iter, final long offset, final long count) {
          N.checkArgNotNegative(count, "offset");
          N.checkArgNotNegative(count, "count");
  
          if (iter == null) {
              return ObjIterator.empty();
          }
  
          return new ObjIterator<T>() {
              private long cnt = count;
              private boolean skipped = false;
  
              @Override
              public boolean hasNext() {
                  if (skipped == false) {
                      skip();
                  }
  
                  return cnt > 0 && iter.hasNext();
              }
  
              @Override
              public T next() {
                  if (hasNext() == false) {
                      throw new NoSuchElementException();
                  }
  
                  cnt--;
                  return iter.next();
              }
  
              private void skip() {
                  long idx = 0;
  
                  while (idx++ < offset && iter.hasNext()) {
                      iter.next();
                  }
  
                  skipped = true;
              }
          };
      }
docs: Calls {@code next()} on {@code iterator}, either {@code offset} times
  or until {@code hasNext()} returns {@code false}, whichever comes first.
  
  This is a lazy evaluation operation. The {@code skip} action is only triggered when {@code Iterator.hasNext()} or {@code Iterator.next()} is called.
  
  @param iter
  @param offset
  @param count
  @return