code: public Object opt(int index) {
          if (index < 0 || index >= values.size()) {
              return null;
          }
          return values.get(index);
      }
docs: Returns the value at {@code index}, or null if the array has no value
  at {@code index}.