Spec-Zone.ru › OpenJDK 27

Class AccessibleRelationSet

java.lang.Object
javax.accessibility.AccessibleRelationSet
public class AccessibleRelationSet extends Object
Class AccessibleRelationSet determines a component's relation set. The relation set of a component is a set of AccessibleRelation objects that describe the component's relationships with other components.
Since:
1.3
See Also:
  • AccessibleRelation

Field Summary

Modifier and Type Field Description
protected Vector<AccessibleRelation> relations
Each entry in the Vector represents an AccessibleRelation.

Constructor Summary

Constructor Description
AccessibleRelationSet()
Creates a new empty relation set.
AccessibleRelationSet(AccessibleRelation[] relations)
Creates a new relation with the initial set of relations contained in the array of relations passed in.

Method Summary

Modifier and Type Method Description
boolean add(AccessibleRelation relation)
Adds a new relation to the current relation set.
void addAll(AccessibleRelation[] relations)
Adds all of the relations to the existing relation set.
void clear()
Removes all the relations from the current relation set.
boolean contains(String key)
Returns whether the relation set contains a relation that matches the specified key.
AccessibleRelation get(String key)
Returns the relation that matches the specified key.
boolean remove(AccessibleRelation relation)
Removes a relation from the current relation set.
int size()
Returns the number of relations in the relation set.
AccessibleRelation[] toArray()
Returns the current relation set as an array of AccessibleRelation.
String toString()
Creates a localized string representing all the relations in the set using the default locale.

Methods declared in class Object

clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Modifier and Type Method Description
protected Object clone()
Creates and returns a copy of this object.
boolean equals(Object obj)
Indicates whether some other object is "equal to" this one.
protected void finalize()
Deprecated, for removal: This API element is subject to removal in a future version.
Finalization is deprecated and subject to removal in a future release.
final Class<?> getClass()
Returns the runtime class of this Object.
int hashCode()
Returns a hash code value for this object.
final void notify()
Wakes up a single thread that is waiting on this object's monitor.
final void notifyAll()
Wakes up all threads that are waiting on this object's monitor.
final void wait()
Causes the current thread to wait until it is awakened, typically by being notified or interrupted.
final void wait(long timeoutMillis)
Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed.
final void wait(long timeoutMillis, int nanos)
Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed.

Field Details

relations

protected Vector<AccessibleRelation> relations
Each entry in the Vector represents an AccessibleRelation.
See Also:
  • add(AccessibleRelation)
  • addAll(AccessibleRelation[])
  • remove(AccessibleRelation)
  • contains(String)
  • get(String)
  • size()
  • toArray()
  • clear()

Constructor Details

AccessibleRelationSet

public AccessibleRelationSet()
Creates a new empty relation set.

AccessibleRelationSet

public AccessibleRelationSet(AccessibleRelation[] relations)
Creates a new relation with the initial set of relations contained in the array of relations passed in. Duplicate entries are ignored.
Parameters:
relations - an array of AccessibleRelation describing the relation set

Method Details

add

public boolean add(AccessibleRelation relation)
Adds a new relation to the current relation set. If the relation is already in the relation set, the target(s) of the specified relation is merged with the target(s) of the existing relation. Otherwise, the new relation is added to the relation set.
Parameters:
relation - the relation to add to the relation set
Returns:
true if relation is added to the relation set; false if the relation set is unchanged

addAll

public void addAll(AccessibleRelation[] relations)
Adds all of the relations to the existing relation set. Duplicate entries are ignored.
Parameters:
relations - AccessibleRelation array describing the relation set

remove

public boolean remove(AccessibleRelation relation)
Removes a relation from the current relation set. If the relation is not in the set, the relation set will be unchanged and the return value will be false. If the relation is in the relation set, it will be removed from the set and the return value will be true.
Parameters:
relation - the relation to remove from the relation set
Returns:
true if the relation is in the relation set; false if the relation set is unchanged

clear

public void clear()
Removes all the relations from the current relation set.

size

public int size()
Returns the number of relations in the relation set.
Returns:
the number of relations in the relation set

contains

public boolean contains(String key)
Returns whether the relation set contains a relation that matches the specified key.
Parameters:
key - the AccessibleRelation key
Returns:
true if the relation is in the relation set; otherwise false

get

public AccessibleRelation get(String key)
Returns the relation that matches the specified key.
Parameters:
key - the AccessibleRelation key
Returns:
the relation, if one exists, that matches the specified key. Otherwise, null is returned.

toArray

public AccessibleRelation[] toArray()
Returns the current relation set as an array of AccessibleRelation.
Returns:
AccessibleRelation array contacting the current relation

toString

public String toString()
Creates a localized string representing all the relations in the set using the default locale.
Overrides:
toString in class Object
Returns:
comma separated localized string
See Also:
  • AccessibleBundle.toDisplayString(String, Locale)

Report a bug or suggest an enhancement
For further API reference and developer documentation see the Java SE Documentation, which contains more detailed, developer-targeted descriptions with conceptual overviews, definitions of terms, workarounds, and working code examples. Other versions.
Java is a trademark or registered trademark of Oracle and/or its affiliates in the US and other countries.
Copyright © 1993, 2026, Oracle and/or its affiliates, 500 Oracle Parkway, Redwood Shores, CA 94065 USA.
All rights reserved. Use is subject to license terms and the documentation redistribution policy.

© 1993, 2025, Oracle and/or its affiliates. All rights reserved.
Documentation extracted from Debian's OpenJDK Development Kit package.
Licensed under the GNU General Public License, version 2, with the Classpath Exception.
Various third party code in OpenJDK is licensed under different licenses (see Debian package).
Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API