public KeysetHandle.Entry getAt(int i) {
    if (i < 0 || i >= size()) {
      throw new IndexOutOfBoundsException("Invalid index " + i + " for keyset of size " + size());
    }
    return entryByIndex(i);
  }
Returns the entry at index i. The order is preserved and depends on the order at which the
entries were inserted when the KeysetHandle was built.

<p>Currently, this may throw "IllegalStateException" in case the status entry of the Key in the
keyset was wrongly set. In this case, we call this KeysetHandle invalid. In the future, Tink
will throw at parsing time in this case, and we will not have invalid KeysetHandles.

<p>If you want to ensure that this does not throw an IllegalStateException, please first
re-parse the KeysetHandle: {@code KeysetHandle guaranteedValid =
KeysetHandle.newBuilder(maybeInvalidHandle).build();} (This would throw a {@code
GeneralSecurityException} if the {@code maybeInvalidHandle} handle is invalid).

@throws IndexOutOfBoundsException if i < 0 or i >= size();
java_src/src/main/java/com/google/crypto/tink/KeysetHandle.java