The indexOf method of the IntRanges Class contains the following signatures:
indexOf(int find, int fromRange)
indexOf(int find)
Searches from a starting index for a range pair containing a given a number. This method sorts but does not condense the ranges.
public synchronized int indexOf(int find, int fromRange);
Throws ArrayIndexOutOfBoundsException if the index is less than zero or equal to or greater than the array size.
Returns the index of the range pair that includes the number if found; otherwise, returns -1.
find | The number to search for. |
fromRange | The index of the range pair to start the search from. |
Searches from the beginning for a range pair containing a given number. This method sorts but does not condense the ranges.
public int indexOf(int find);
Retuens the index of the range pair that includes the number (if found); otherwise, returns -1.
find | The number to search for. |