TextRange

class TextRange

The smallest and largest text seen at a path, possibly truncated.

Truncation always widens, never narrows, so a truncated range is still a correct range: min is a prefix of the true minimum and therefore no larger than it, and max is a prefix with its last byte incremented and therefore no smaller than the true maximum. That is what keeps a bound usable for skipping — a narrowed bound would let a query decide a segment cannot hold a value it does hold, which is the one failure a statistic must never cause.

A value long enough that no upper bound can be represented — sixty-four bytes of 0xFF, which no UTF-8 text produces — leaves max null, meaning no claim is made.

Properties

Link copied to clipboard
val max: String?

The upper bound as text, or null when none could be represented.

Link copied to clipboard

Whether max is the true maximum rather than a widened prefix of it.

Link copied to clipboard
val min: String

The lower bound as text. Always valid UTF-8: truncation cuts on a code-point boundary.

Link copied to clipboard

Whether min is the true minimum rather than a prefix of it.

Functions

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard

The upper bound's bytes, or null when none could be represented.

Link copied to clipboard

The lower bound's bytes.

Link copied to clipboard
open override fun toString(): String