code: public static IntIteratorEx of(final Supplier<? extends IntIterator> iteratorSupplier) {
          N.checkArgNotNull(iteratorSupplier, "iteratorSupplier");
  
          return new IntIteratorEx() {
              private IntIterator iter = null;
              private IntIteratorEx iterEx = null;
              private boolean isInitialized = false;
  
              @Override
              public boolean hasNext() {
                  if (isInitialized == false) {
                      init();
                  }
  
                  return iter.hasNext();
              }
  
              @Override
              public int nextInt() {
                  if (isInitialized == false) {
                      init();
                  }
  
                  return iter.nextInt();
              }
  
              @Override
              public void skip(long n) {
                  N.checkArgNotNegative(n, "n");
  
                  if (isInitialized == false) {
                      init();
                  }
  
                  if (iterEx != null) {
                      iterEx.skip(n);
                  } else {
                      super.skip(n);
                  }
              }
  
              @Override
              public long count() {
                  if (isInitialized == false) {
                      init();
                  }
  
                  if (iterEx != null) {
                      return iterEx.count();
                  } else {
                      return super.count();
                  }
              }
  
              @Override
              public void close() {
                  if (isInitialized == false) {
                      init();
                  }
  
                  if (iterEx != null) {
                      iterEx.close();
                  }
              }
  
              private void init() {
                  if (isInitialized == false) {
                      isInitialized = true;
                      iter = iteratorSupplier.get();
                      iterEx = iter instanceof IntIteratorEx ? (IntIteratorEx) iter : null;
                  }
              }
          };
      }
docs: Lazy evaluation.
  
  @param iteratorSupplier
  @return