boolean inRange(Long[][] listOfRanges, Long[] exclusions)
Indicates whether or not this integer (long, integer, short) value is within the specified list of ranges. The checking is inclusive, meaning that the lower and upper bounds of the ranges will be tested for the long value. A separate list of exclusions can be provided to indicate that even though the long value is within the list of ranges, it should not be accepted if found within the exclusions list.
Note:
The long data type is a 64-bit two's complement integer. The signed long has a minimum value of -263 and a maximum value of 263-1. Long, integer and short data types can be passed as arguments to the function. The inRange function is overloaded and supports other numeric ranges such as double and float. To ensure that the correct signature is invoked, make sure that the proper numeric syntax is used (no decimal for integer, decimal for floating point).
Input Parameters
listOfRanges | Integer List The list of ranges to check against. This is a two-dimensional long array with the outer dimension containing the list of ranges and the inner dimension containing the upper and lower bounds of each range. The outer dimension can contain 1-n elements, while the inner dimension must always contain exactly two elements. |
exclusions | Integer List An array of items to be excluded from the range check. |
Return Value
Boolean Returns true if this integer exists within the specified list of ranges, false otherwise. |