Skip to content

RangeList

abstract class RangeList<E>
Extends: AbstractList<E>
Implements: RandomAccess
Package: dev.joid.internal · Module: core · Source: RangeList.java

Read-only list of the options of a slider range, whose values are computed from their index instead of stored.

IntegerSliderNode and DoubleSliderNode hold their range in one, so a range of millions of values costs nothing; getValueList() returns it. contains and indexOf compute the index of a value instead of walking the list.

ReturnsSignatureSummary
RangeList()Creates the list, for a subclass that gives get(int), size(), indexOf(Object) and nearest(E).

ReturnsSignatureSummary
intlastIndexOf(Object value)Returns the index of value, the same as indexOf, since an option appears once.
booleancontains(Object value)If true, value is one of the options; it calls indexOf.
StringtoString()Returns the options in brackets, shortened to the first two and the last one past ten options: [1, 2, ..., 2147483647].
ReturnsSignatureSummary
Enearest(E value) hook abstractReturns the option nearest to value, the smaller one on a tie.

RangeList()

Creates the list, for a subclass that gives get(int), size(), indexOf(Object) and nearest(E).

int lastIndexOf(Object value)

Returns the index of value, the same as indexOf, since an option appears once.

boolean contains(Object value)

If true, value is one of the options; it calls indexOf.

String toString()

Returns the options in brackets, shortened to the first two and the last one past ten options: [1, 2, ..., 2147483647].

E nearest(E value) hook abstract

Returns the option nearest to value, the smaller one on a tie.


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