Package com.macrofocus.common.selection

# Interface SingleSelection<E>

Type Parameters:
  `E` - the type of elements that can be selected

All Superinterfaces:
  `Iterable<E>`, `Selection<E>`

All Known Subinterfaces:
  `MutableSingleSelection<E>`

All Known Implementing Classes:
  `AbstractMutableSingleSelection`, `BeanSingleSelection`, `NullSingleSelection`, `PropertySingleSelection`, `SimpleSingleSelection`

public interface SingleSelection<E> extends Selection<E>
This interface constrains the selection to be restricted to a single element.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `addSingleSelectionListener(SingleSelectionListener<E> listener)`
  `void`
  `addWeakSingleSelectionListener(SingleSelectionListener<E> listener)`
  `E`
  `getSelected()`
  `void`
  `removeSingleSelectionListener(SingleSelectionListener<E> listener)`

  ### Methods inherited from interface java.lang.Iterable

  `forEach, iterator, spliterator`

  ### Methods inherited from interface com.macrofocus.common.selection.Selection

  `addSelectionListener, addWeakSelectionListener, getSelectedCount, getSelectedSet, isActive, isEnabled, isSelected, removeSelectionListener, removeSelectionListeners`

- ## Method Details

  - ### getSelected

    E getSelected()

  - ### addSingleSelectionListener

    void addSingleSelectionListener(SingleSelectionListener<E> listener)

  - ### addWeakSingleSelectionListener

    void addWeakSingleSelectionListener(SingleSelectionListener<E> listener)

  - ### removeSingleSelectionListener

    void removeSingleSelectionListener(SingleSelectionListener<E> listener)