@SuppressWarnings("unchecked")
  public static <base, T extends base> T getOption(Class<T> cls, base [] opts
                                                   ) throws IOException {
    for(base o: opts) {
      if (o.getClass() == cls) {
        return (T) o;
      }
    }
    return null;
  }
@Test
  public void testFind() throws Exception {
     Object[] opts = new Object[]{1, "hi", true, "bye", 'x'};
     assertEquals(1, Options.getOption(Integer.class, opts).intValue());
     assertEquals("hi", Options.getOption(String.class, opts));
     assertEquals(true, Options.getOption(Boolean.class, opts).booleanValue());
  }