# AccessibilityNodeInfoCompat.SelectionCompat

Artifact: [androidx.core:core](https://developer.android.com/jetpack/androidx/releases/core) [View Source](https://cs.android.com/search?q=file:androidx/core/view/accessibility/AccessibilityNodeInfoCompat.java+class:androidx.core.view.accessibility.AccessibilityNodeInfoCompat.SelectionCompat) Added in [1.18.0](https://developer.android.com/jetpack/androidx/releases/core#1.18.0)

*** ** * ** ***


```
public final class AccessibilityNodeInfoCompat.SelectionCompat
```

<br />

*** ** * ** ***

Compat class for AccessibilityNodeInfo.Selection, which is a class that represents a selection of content that may extend across more than one `https://developer.android.com/reference/android/view/accessibility/AccessibilityNodeInfo.html` instance.

| See also |
|---|---|
| `https://developer.android.com/reference/android/view/accessibility/AccessibilityNodeInfo.Selection.html` | Compatibility: - API \<: 36.1: Class methods perform no-op behavior. |

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.SelectionCompat#SelectionCompat(android.view.accessibility.AccessibilityNodeInfo.Selection)(@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/android/view/accessibility/AccessibilityNodeInfo.Selection.html selection)` Instantiates a new SelectionCompat. |
| `https://developer.android.com/reference/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.SelectionCompat#SelectionCompat(androidx.core.view.accessibility.AccessibilityNodeInfoCompat.SelectionPositionCompat,androidx.core.view.accessibility.AccessibilityNodeInfoCompat.SelectionPositionCompat)( @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.SelectionPositionCompat start, @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.SelectionPositionCompat end )` Instantiates a new SelectionCompat. |

| ### Public methods |
|---|---|
| `boolean` | `https://developer.android.com/reference/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.SelectionCompat#equals(java.lang.Object)(https://developer.android.com/reference/java/lang/Object.html obj)` Compatibility: |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.SelectionPositionCompat` | `https://developer.android.com/reference/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.SelectionCompat#getEnd()()` |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.SelectionPositionCompat` | `https://developer.android.com/reference/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.SelectionCompat#getStart()()` |
| `int` | `https://developer.android.com/reference/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.SelectionCompat#hashCode()()` Compatibility: |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/android/view/accessibility/AccessibilityNodeInfo.Selection.html` | `https://developer.android.com/reference/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.SelectionCompat#unwrap()()` Returns the underlying platform `https://developer.android.com/reference/android/view/accessibility/AccessibilityNodeInfo.Selection.html` object. |

## Public constructors

### SelectionCompat

Added in [1.18.0](https://developer.android.com/jetpack/androidx/releases/core#1.18.0)

```
public SelectionCompat(@Nullable AccessibilityNodeInfo.Selection selection)
```

Instantiates a new SelectionCompat.

| Parameters |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/android/view/accessibility/AccessibilityNodeInfo.Selection.html selection` | The underlying Selection to wrap. |

### SelectionCompat

Added in [1.18.0](https://developer.android.com/jetpack/androidx/releases/core#1.18.0)

```
public SelectionCompat(
    @NonNull AccessibilityNodeInfoCompat.SelectionPositionCompat start,
    @NonNull AccessibilityNodeInfoCompat.SelectionPositionCompat end
)
```

Instantiates a new SelectionCompat.

| Parameters |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.SelectionPositionCompat start` | The start of the extended selection. |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.SelectionPositionCompat end` | The end of the extended selection. |

## Public methods

### equals

```
public boolean equals(Object obj)
```

Compatibility:

- API \<: 36.1: Returns `true` if this object is identical to `obj`, else `false`

### getEnd

Added in [1.18.0](https://developer.android.com/jetpack/androidx/releases/core#1.18.0)

```
public @Nullable AccessibilityNodeInfoCompat.SelectionPositionCompat getEnd()
```

| Returns |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.SelectionPositionCompat` | The end of the extended selection. Compatibility: - API \<: 36.1: Always returns `null` |

### getStart

Added in [1.18.0](https://developer.android.com/jetpack/androidx/releases/core#1.18.0)

```
public @Nullable AccessibilityNodeInfoCompat.SelectionPositionCompat getStart()
```

| Returns |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.SelectionPositionCompat` | The start of the extended selection. Compatibility: - API \<: 36.1: Always returns `null` |

### hashCode

```
public int hashCode()
```

Compatibility:

- API \<: 36.1: Always returns `0`

### unwrap

Added in [1.19.1](https://developer.android.com/jetpack/androidx/releases/core#1.19.1)

```
public @Nullable AccessibilityNodeInfo.Selection unwrap()
```

Returns the underlying platform `https://developer.android.com/reference/android/view/accessibility/AccessibilityNodeInfo.Selection.html` object.

| Returns |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/android/view/accessibility/AccessibilityNodeInfo.Selection.html` | The platform `https://developer.android.com/reference/android/view/accessibility/AccessibilityNodeInfo.Selection.html` object, or `null` if the compat object was created on an API level lower than 36.1. |