code: public static CreateOptions getOpt(Class<? extends CreateOptions> theClass, CreateOptions... opts) {
      if (opts == null)
        return null;
      CreateOptions result = null;
      for (int i = 0; i < opts.length; ++i) {
        if (opts[i].getClass() == theClass) {
          if (result != null)
            throw new IllegalArgumentException("Multiple args with type " + theClass);
          result = opts[i];
        }
      }
      return result;
    }
docs: Get an option of desired type
  
  @param theClass
  is the desired class of the opt
  @param opts
  - not null - at least one opt must be passed
  @return an opt from one of the opts of type theClass.
  returns null if there isn't any