Class TypedKey<T>

java.lang.Object
org.apache.arrow.adbc.core.TypedKey<T>
Type Parameters:
T - The option value type.

public final class TypedKey<T> extends Object
A typesafe option key.
Since:
ADBC API revision 1.1.0
  • Constructor Details

  • Method Details

    • getKey

      public String getKey()
      Get the option key.
    • get

      public @Nullable T get(Map<String,Object> options)
      Get the option value (if it was set) and check the type.
      Throws:
      ClassCastException - if the value is of the wrong type.
    • set

      public void set(Map<String,Object> options, @NonNull T value)
      Set this option in an options map (like for AdbcDriver.open(Map).
      Parameters:
      options - The options.
      value - The option value.
    • equals

      public boolean equals(@Nullable Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object