code: public char setIndex(int location) {
          if (location < start || location > end) {
              throw new IllegalArgumentException();
          }
          offset = location;
          if (offset == end) {
              return DONE;
          }
          return string.charAt(offset);
      }
docs: Sets the current index in the source string.
  
  @param location
  the index the current position is set to.
  @return the character at the new index, or {@code DONE} if
  {@code location} is set to the end index.
  @throws IllegalArgumentException
  if {@code location} is smaller than the begin index or greater
  than the end index.