Interface OptionKey<T>

  • Type Parameters:
    T - the option type

    @NonExtendable
    public interface OptionKey<T>
    Represents a key for a custom option defined in QueryOptions.

    It is intended that OptionKeys are created and defined as follows.

         public static final OptionKey<String> SPECIAL_OPTION = OptionKey.of("special", String.class);
     
    • Method Detail

      • of

        static <T> @NonNull OptionKey<T> of​(@NonNull String name,
                                            @NonNull Class<T> type)
        Creates a new NodeMetadataKey for the given name and type.

        Note that the returned key implements object reference equality.

        Type Parameters:
        T - the type parameter
        Parameters:
        name - the name
        type - the type
        Returns:
        the key
      • name

        @NonNull String name()
        Gets a name describing the key type.
        Returns:
        the key name
      • type

        @NonNull Class<T> type()
        Gets the type of the key
        Returns:
        the type