AccessibilityNodeInfoCompat.StructuredDataInfoCompat


public abstract class AccessibilityNodeInfoCompat.StructuredDataInfoCompat

Known direct subclasses
AccessibilityNodeInfoCompat.MathInfoCompat

Compat class for AccessibilityNodeInfo.MathInfo, which is a class that holds information about a node that represents a mathematical expression.

AccessibilityNodeInfoCompat.PublicationInfoCompat

Holds information about a node that represents a part of a digital publication, such as a chapter, footnote, or glossary entry.


Compat class for AccessibilityNodeInfo.StructuredDataInfo, which is an abstract base class for holding structured semantic information about a node.

On API levels where the platform class corresponding to a subclass isn't available, setStructuredDataInfo stores the information in the node's extras instead. Accessibility services can read it from there with getStructuredDataInfo, but not with getStructuredDataInfo.

Summary

Protected constructors

Instantiates a new StructuredDataInfoCompat.

Public methods

boolean
@Nullable String
getAttribute(@NonNull String attributeKey)

Gets the value of an attribute.

@NonNull Map<String, String>

Returns an unmodifiable map of attributes.

@Nullable String
int
void
putAttribute(@NonNull String attributeKey, @NonNull String value)

Adds an attribute.

void

Removes an attribute.

@NonNull String

Protected constructors

StructuredDataInfoCompat

Added in 1.19.0
protected StructuredDataInfoCompat(
    @Nullable AccessibilityNodeInfo.StructuredDataInfo structuredDataInfo
)

Instantiates a new StructuredDataInfoCompat.

Parameters
@Nullable AccessibilityNodeInfo.StructuredDataInfo structuredDataInfo

The underlying StructuredDataInfo to wrap.

Public methods

equals

public boolean equals(@Nullable Object obj)

getAttribute

Added in 1.19.0
public @Nullable String getAttribute(@NonNull String attributeKey)

Gets the value of an attribute.

Parameters
@NonNull String attributeKey

The attribute key.

Returns
@Nullable String

The attribute value.

getAttributes

Added in 1.19.0
public @NonNull Map<String, String> getAttributes()

Returns an unmodifiable map of attributes.

Returns
@NonNull Map<String, String>

An unmodifiable Map of attribute keys to values.

getTag

Added in 1.19.0
public @Nullable String getTag()
Returns
@Nullable String

The tag for this structured semantic information.

hashCode

public int hashCode()

putAttribute

Added in 1.19.0
public void putAttribute(@NonNull String attributeKey, @NonNull String value)

Adds an attribute.

Parameters
@NonNull String attributeKey

The attribute key.

@NonNull String value

The attribute value.

removeAttribute

Added in 1.19.0
public void removeAttribute(@NonNull String attributeKey)

Removes an attribute.

Parameters
@NonNull String attributeKey

The attribute key.

toString

public @NonNull String toString()