# GoToLinkSelection

Artifact: [androidx.pdf:pdf-core](https://developer.android.com/jetpack/androidx/releases/pdf) [View Source](https://cs.android.com/search?q=file:androidx/pdf/selection/model/GoToLinkSelection.kt+class:androidx.pdf.selection.model.GoToLinkSelection) Added in [1.0.0-beta01](https://developer.android.com/jetpack/androidx/releases/pdf#1.0.0-beta01)

*** ** * ** ***


```
public final class GoToLinkSelection implements LinkSelection
```

<br />

*** ** * ** ***

A `https://developer.android.com/reference/androidx/pdf/selection/Selection` for a goto link.

This represents a text range that is also a goto link, containing both the link destination and the text that is displayed.

## Summary

| ### Nested types |
|---|
| `public final class https://developer.android.com/reference/androidx/pdf/selection/model/GoToLinkSelection.Destination` Creates a new instance of GoToLinkSelection.Destination using the page number, x coordinate, and y coordinate of the destination where goto link is directing, and the zoom factor of the page when goto link takes to the destination |

| ### Public constructors |
|---|
| `https://developer.android.com/reference/androidx/pdf/selection/model/GoToLinkSelection#GoToLinkSelection(androidx.pdf.selection.model.GoToLinkSelection.Destination,kotlin.CharSequence,kotlin.collections.List)( @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/pdf/selection/model/GoToLinkSelection.Destination destination, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/CharSequence.html linkText, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/util/List.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/pdf/PdfRect> bounds )` |

| ### Public methods |
|---|---|
| `boolean` | `https://developer.android.com/reference/androidx/pdf/selection/model/GoToLinkSelection#equals(kotlin.Any)(https://developer.android.com/reference/java/lang/Object.html other)` |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/util/List.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/pdf/PdfRect>` | `https://developer.android.com/reference/androidx/pdf/selection/model/GoToLinkSelection#getBounds()()` The list of bounding boxes for the text. |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/pdf/selection/model/GoToLinkSelection.Destination` | `https://developer.android.com/reference/androidx/pdf/selection/model/GoToLinkSelection#getDestination()()` The destination of the goto link. |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/CharSequence.html` | `https://developer.android.com/reference/androidx/pdf/selection/model/GoToLinkSelection#getLinkText()()` The text that is displayed as a goto link. |
| `int` | `https://developer.android.com/reference/androidx/pdf/selection/model/GoToLinkSelection#hashCode()()` |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/androidx/pdf/selection/model/GoToLinkSelection#toString()()` |

## Public constructors

### GoToLinkSelection

Added in [1.0.0-beta01](https://developer.android.com/jetpack/androidx/releases/pdf#1.0.0-beta01)

```
public GoToLinkSelection(
    @NonNull GoToLinkSelection.Destination destination,
    @NonNull CharSequence linkText,
    @NonNull List<@NonNull PdfRect> bounds
)
```

## Public methods

### equals

```
public boolean equals(Object other)
```

### getBounds

```
public @NonNull List<@NonNull PdfRect> getBounds()
```

The list of bounding boxes for the text.

### getDestination

Added in [1.0.0-beta01](https://developer.android.com/jetpack/androidx/releases/pdf#1.0.0-beta01)

```
public final @NonNull GoToLinkSelection.Destination getDestination()
```

The destination of the goto link.

### getLinkText

```
public @NonNull CharSequence getLinkText()
```

The text that is displayed as a goto link.

### hashCode

```
public int hashCode()
```

### toString

```
public @NonNull String toString()
```