code: public IntSet.IntIterator iterator()
    {
      if (isEmpty()) {
        return new IntSet.IntIterator()
        {
          @Override
          public void skipAllBefore(int element) {/*empty*/}
  
          @Override
          public boolean hasNext() {return false;}
  
          @Override
          public int next() {throw new NoSuchElementException();}
  
          @Override
          public void remove() {throw new UnsupportedOperationException();}
  
          @Override
          public IntSet.IntIterator clone() {throw new UnsupportedOperationException();}
        };
      }
      return new BitIterator();
    }
docs: Based on the ConciseSet implementation by Alessandro Colantonio