public class AccessibleStateSet extends Object
AccessibleState
Modifier and Type | Field and Description |
---|---|
protected Vector<AccessibleState> |
states
The list of states, should be instances of AccessibleState.
|
Constructor and Description |
---|
AccessibleStateSet()
Create an empty state set.
|
AccessibleStateSet(AccessibleState[] states)
Create a state set initialized with the given states, duplicates are
ignored.
|
Modifier and Type | Method and Description |
---|---|
boolean |
add(AccessibleState state)
Add a new state to the current set.
|
void |
addAll(AccessibleState[] array)
Add all of the states to the current set.
|
void |
clear()
Clear all states in the set.
|
boolean |
contains(AccessibleState state)
Check if the current state is in the set.
|
boolean |
remove(AccessibleState state)
Remove a state from the set.
|
AccessibleState[] |
toArray()
Return the state set as an array.
|
String |
toString()
Return a localized, comma-separated string representing all states
in the set.
|
protected Vector<AccessibleState> states
public AccessibleStateSet()
public AccessibleStateSet(AccessibleState[] states)
states
- the states to insertNullPointerException
- if states is nullpublic boolean add(AccessibleState state)
state
- the state to addpublic void addAll(AccessibleState[] array)
array
- the array of states to addNullPointerException
- if array is nullpublic boolean remove(AccessibleState state)
state
- the state to removepublic void clear()
public boolean contains(AccessibleState state)
state
- the state to locatepublic AccessibleState[] toArray()
public String toString()
toString
in class Object
AccessibleBundle.toDisplayString(String, Locale)