public static @Nullable("can become null if the key has been gc-ed") <T> Key<T> getKeyByIndex(int index) {
    synchronized (allKeys) {
      //noinspection unchecked
      return (Key<T>)allKeys.get(index);
    }
  }
public static @Nullable("can become null if the key has been gc-ed") <T> Key<T> getKeyByIndex(int index)