# Class RadioState

java.lang.Object
org.eclipse.core.commands.common.EventManager
org.eclipse.core.commands.State
org.eclipse.jface.commands.PersistentState
org.eclipse.jface.commands.ToggleState
org.eclipse.jface.commands.RadioState

Direct Known Subclasses:
  `RegistryRadioState`

public class RadioState extends ToggleState

A piece of boolean state grouped with other boolean states. Of these states, only one may have a value of `Boolean.TRUE` at any given point in time. The values of all other states must be `Boolean.FALSE`.

If this state is registered using `IMenuStateIds.STYLE`, then it will control the presentation of the command if displayed in the menus, tool bars or status line.

Clients may instantiate or extend this interface.

Since:
  3.2

## Constructor Summary

Constructors
Constructor
Description
`RadioState()`

## Method Summary

Modifier and Type
Method
Description
`void`
`dispose()`
Unregisters this state from the manager, which detaches the listeners.
`final void`
`setRadioGroupIdentifier(String identifier)`
Sets the identifier of the radio group for this piece of state.
`void`
`setValue(Object value)`
Sets the value for this object.

### Methods inherited from class ToggleState

`load, save`

### Methods inherited from class PersistentState

`setShouldPersist, shouldPersist`

### Methods inherited from class State

`addListener, fireStateChanged, getId, getValue, removeListener, setId`

### Methods inherited from class EventManager

`addListenerObject, clearListeners, getListeners, isListenerAttached, removeListenerObject`

### Methods inherited from class Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### RadioState

public RadioState()

## Method Details

### dispose

public void dispose()
Unregisters this state from the manager, which detaches the listeners.

Overrides:
  `dispose` in class `State`

### setRadioGroupIdentifier

public final void setRadioGroupIdentifier(String identifier)
Sets the identifier of the radio group for this piece of state. If the identifier is cleared, then the state is unregistered.

Parameters:
  `identifier` - The identifier of the radio group for this state; may be `null` if the identifier is being cleared.

### setValue

public void setValue(Object value)
Sets the value for this object. This notifies the radio state manager of the change.

Overrides:
  `setValue` in class `ToggleState`
Parameters:
  `value` - The new value; should be a `Boolean`.