@ExperimentalApi("https://github.com/grpc/grpc-java/issues/1869")
  @SuppressWarnings("unchecked")
  public <T> T getOption(Key<T> key) {
    Preconditions.checkNotNull(key, "key");
    for (int i = 0; i < customOptions.length; i++) {
      if (key.equals(customOptions[i][0])) {
        return (T) customOptions[i][1];
      }
    }
    return key.defaultValue;
  }
@ ExperimentalApi ( "https://github.com/grpc/grpc-java/issues/1869" ) @ SuppressWarnings ( "unchecked" ) public < T > T getOption ( Key < T > key ) { Preconditions . checkNotNull ( key , "key" ) ; for ( int i = 0 ; i < customOptions . length ; i ++ ) { if ( key . equals ( customOptions [ i ] [ 0 ] ) ) { return ( T ) customOptions [ i ] [ 1 ] ; } } return key . defaultValue ; }
Get the value for a custom option or its inherent default.
@param key Key identifying option