---
title: "OptionValues"
description: "Represents a set of option values based on an OptionDescriptor."
kind: "interface"
id: "org.graalvm.options.OptionValues"
module: "polyglot"
version: "25.6.0-elide.4"
canonical: "https://graalvm.elide.help/25.6.0-elide.4/api/polyglot/org/graalvm/options/OptionValues.html"
---

# ◇ OptionValues

[polyglot](../../../index.md) › [org.graalvm.options](index.md) · Every page: [llms.txt](../../../llms.txt)

Interface in [`org.graalvm.options`](index.md). Since 19.0.

```java
public interface OptionValues
```

Represents a set of option values based on an [`OptionDescriptor`](OptionDescriptor.md).

## Methods

### getDescriptors()
<a id="getDescriptors()"></a>`OptionDescriptors getDescriptors()`. Since 19.0. Returns all available options. Cite: `org/graalvm/options/OptionValues.html#getDescriptors()`

### set(OptionKey, T)
<a id="set(org.graalvm.options.OptionKey,T)"></a>`@Deprecated(since = "22.0") default <T> void set(OptionKey<T> optionKey, T value)`. Since 19.0. Deprecated since 22.0. `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` (unchecked): because this operation has been deprecated and is no longer supported, in order for OptionValues to be read-only. Cite: `org/graalvm/options/OptionValues.html#set(org.graalvm.options.OptionKey,T)`

### get(OptionKey)
<a id="get(org.graalvm.options.OptionKey)"></a>`<T> T get(OptionKey<T> optionKey)`. Since 19.0. 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`. Cite: `org/graalvm/options/OptionValues.html#get(org.graalvm.options.OptionKey)`

### hasBeenSet(OptionKey)
<a id="hasBeenSet(org.graalvm.options.OptionKey)"></a>`boolean hasBeenSet(OptionKey<?> optionKey)`. Since 19.0. Determines if a value for `optionKey` has been set explicitly by the `Context` or `Engine`, and therefore `get(OptionKey)` does not call `OptionKey.getDefaultValue()`. Cite: `org/graalvm/options/OptionValues.html#hasBeenSet(org.graalvm.options.OptionKey)`

### hasSetOptions()
<a id="hasSetOptions()"></a>`default boolean hasSetOptions()`. Since 19.0. Determines if a value for any of the option keys in `option descriptors` `has been set`. Cite: `org/graalvm/options/OptionValues.html#hasSetOptions()`
