public final class

SearchResult.MatchRange

extends java.lang.Object

 java.lang.Object

↳androidx.appsearch.app.SearchResult.MatchRange

Overview

Class providing the position range of matching information.

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

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

Summary

Constructors
publicMatchRange(int start, int end)

Creates a new immutable range.

Methods
public booleanequals(java.lang.Object other)

public intgetEnd()

Gets the end point (exclusive).

public intgetStart()

Gets the start point (inclusive).

public inthashCode()

public java.lang.StringtoString()

from java.lang.Objectclone, finalize, getClass, notify, notifyAll, wait, wait, wait

Constructors

public MatchRange(int start, int end)

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: The start point (inclusive)
end: The end point (exclusive)

Methods

public int getStart()

Gets the start point (inclusive).

public int getEnd()

Gets the end point (exclusive).

public boolean equals(java.lang.Object other)

public java.lang.String toString()

public int hashCode()