Skip to content

FieldSelection

final class FieldSelection
Package: dev.joid.lib.ui.node.impl.control.field · Module: core · Source: FieldSelection.java

A range of characters of a field, from a start index to an end index.

The start is never after the end; an empty range has the start equal to the end.

ReturnsSignatureSummary
FieldSelectionof(int start, int end) factoryCreates a range from two indexes in any order.

ReturnsSignatureSummary
booleanisEmpty()If true, the range holds no character.
intgetStart()Returns the index of the first character of the range.
intgetEnd()Returns the index after the last character of the range.
StringtoString()Returns the start and the end, for logs.
booleanequals(Object other)If true, the other object is of the same class with the same start and end.
inthashCode()Returns a hash of the values that equals compares.

FieldSelection of(int start, int end) factory

Creates a range from two indexes in any order.

boolean isEmpty()

If true, the range holds no character.

int getStart()

Returns the index of the first character of the range.

int getEnd()

Returns the index after the last character of the range.

String toString()

Returns the start and the end, for logs.

boolean equals(Object other)

If true, the other object is of the same class with the same start and end.

int hashCode()

Returns a hash of the values that equals compares.


fluent returns the instance, typed for chaining · factory creates an instance · signal also accepts a value that follows signals, as a signal, an expression or a lambda (When does JOID compute this value again?) · hook called by JOID, override it · abstract you implement it · default interface method with a body · static called on the class · protected visible to subclasses

Report a problem with this page