# SearchResult.MatchRange

Artifact: [androidx.appsearch:appsearch](https://developer.android.com/jetpack/androidx/releases/appsearch) [View Source](https://cs.android.com/search?q=file:androidx/appsearch/app/SearchResult.java+class:androidx.appsearch.app.SearchResult.MatchRange) Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/appsearch#1.1.0)

*** ** * ** ***


```
class SearchResult.MatchRange
```

<br />

*** ** * ** ***

Class providing the position range of a text match information.

All ranges are finite, and the left side of the range is always `<=` the right side of the range.

Example: MatchRange(0, 100) represents hundred ints from 0 to 99."

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/kotlin/androidx/appsearch/app/SearchResult.MatchRange#MatchRange(int,int)(start: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, end: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` Creates a new immutable range. |

| ### Public functions |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/appsearch/app/SearchResult.MatchRange#equals(java.lang.Object)(other: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?)` |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/appsearch/app/SearchResult.MatchRange#getEnd()()` Gets the end point (exclusive). |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/appsearch/app/SearchResult.MatchRange#getStart()()` Gets the start point (inclusive). |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/appsearch/app/SearchResult.MatchRange#hashCode()()` |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | `https://developer.android.com/reference/kotlin/androidx/appsearch/app/SearchResult.MatchRange#toString()()` |

## Public constructors

### MatchRange

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

```
MatchRange(start: Int, end: Int)
```

Creates a new immutable range.

The endpoints are `[start, end)`; that is the range is bounded. `start` must be lesser or equal to `end`.

| Parameters |
|---|---|
| `start: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The start point (inclusive) |
| `end: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The end point (exclusive) |

## Public functions

### equals

```
fun equals(other: Any?): Boolean
```

### getEnd

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

```
fun getEnd(): Int
```

Gets the end point (exclusive).

### getStart

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

```
fun getStart(): Int
```

Gets the start point (inclusive).

### hashCode

```
fun hashCode(): Int
```

### toString

```
fun toString(): String
```