Interface OptionValues


public interface OptionValues
Represents a set of option values based on an OptionDescriptor.
Since:
19.0
  • Method Details

    • getDescriptors

      OptionDescriptors getDescriptors()
      Returns all available options.
      Since:
      19.0
    • set

      @Deprecated(since="22.0") default <T> void set(OptionKey<T> optionKey, T value)
      Deprecated.
      OptionValues should be read-only. If the value of an option needs to be altered after options are set, then the new value should be stored in the language's context or instrument fields and read from there.
      Sets the value of optionKey to value.
      Throws:
      UnsupportedOperationException - because this operation has been deprecated and is no longer supported, in order for OptionValues to be read-only.
      Since:
      19.0
    • get

      <T> T get(OptionKey<T> optionKey)
      Returns the value of a given option. hasBeenSet(OptionKey) can be used to know whether the value was explicitly set, or is the default value.
      Since:
      19.0
    • hasBeenSet

      boolean hasBeenSet(OptionKey<?> optionKey)
      Determines if a value for optionKey has been set explicitly by the Context or Engine, and therefore get(OptionKey) does not call OptionKey.getDefaultValue().
      Since:
      19.0
    • hasSetOptions

      default boolean hasSetOptions()
      Determines if a value for any of the option keys in option descriptors has been set.
      Since:
      19.0