code: public Iterator iterator() {
          return new Iterator() {
              private int index;
              private Object value = reverse ? to : from;
  
              public boolean hasNext() {
                  return index < size();
              }
  
              public Object next() {
                  if (index++ > 0) {
                      if (index > size()) {
                          value = null;
                      } else {
                          if (reverse) {
                              value = decrement(value);
                          } else {
                              value = increment(value);
                          }
                      }
                  }
                  return value;
              }
  
              public void remove() {
                  ObjectRange.this.remove(index);
              }
          };
      }
docs: {@inheritDoc}