# Class Selectors.SelectorList

java.lang.Object
org.eclipse.e4.ui.css.core.impl.engine.selector.Selectors.SelectorList

All Implemented Interfaces:
  `Selectors.Selector`

Enclosing class:
  `Selectors`

public static final class Selectors.SelectorList extends Object implements Selectors.Selector
`a, b` — selector list. Specificity reports the maximum over the alternatives so cascade ordering can match a list against an element by iterating its alternatives.

A regular final class rather than a record because the cascade reads `specificity()` once per matched alternative and we want it precomputed; record components cannot host derived state.

## Constructor Summary

Constructors
Constructor
Description
`SelectorList(List<Selectors.Selector> alternatives)`

## Method Summary

Modifier and Type
Method
Description
`List<Selectors.Selector>`
`alternatives()`
`boolean`
`equals(Object o)`
`int`
`getLength()`
Number of alternatives in the list.
`int`
`hashCode()`
`Selectors.Selector`
`item(int i)`
`i`-th alternative.
`int`
`specificity()`
CSS specificity contribution of this selector.
`String`
`text()`
Best-effort textual reproduction of the selector.
`String`
`toString()`

### Methods inherited from class Object

`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

## Constructor Details

### SelectorList

public SelectorList(List<Selectors.Selector> alternatives)

## Method Details

### alternatives

public List<Selectors.Selector> alternatives()

### getLength

public int getLength()
Number of alternatives in the list. SAC-style accessor for callers iterating the list.

### item

public Selectors.Selector item(int i)
`i`-th alternative. SAC-style accessor for callers iterating the list.

### specificity

public int specificity()
Description copied from interface: `Selectors.Selector`
CSS specificity contribution of this selector.

Specified by:
  `specificity` in interface `Selectors.Selector`

### text

public String text()
Description copied from interface: `Selectors.Selector`
Best-effort textual reproduction of the selector.

Specified by:
  `text` in interface `Selectors.Selector`

### equals

public boolean equals(Object o)

Overrides:
  `equals` in class `Object`

### hashCode

public int hashCode()

Overrides:
  `hashCode` in class `Object`

### toString

public String toString()

Overrides:
  `toString` in class `Object`