public static KeysetHandle.Builder.Entry importKey(Key key) {
    KeysetHandle.Builder.Entry importedEntry = new KeysetHandle.Builder.Entry(key);
    @Nullable Integer requirement = key.getIdRequirementOrNull();
    if (requirement != null) {
      importedEntry.withFixedId(requirement);
    }
    return importedEntry;
  }
Creates a new entry with a fixed key.

<p>If the Key has an IdRequirement, the default will be fixed to this ID. Otherwise, the user
has to specify the ID to be used and call one of {@code withFixedId(i)} or {@code
withRandomId()} on the returned entry.
java_src/src/main/java/com/google/crypto/tink/KeysetHandle.java