Class Index | File Index

Classes


Class RXBuild.Utils.RangeSet

The RangeSet holds a set of numeric ranges sparsely
Defined in: utils.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
Creates a new instance of RangeSet
Field Summary
Field Attributes Field Name and Description
 
True if ranges contained in this instance are to be excluded
 
A sorted array of objects in the form {f: num, t: num} specifying inclusive bounds
Method Summary
Method Attributes Method Name and Description
 
add(range)
The add method adds the specified range to the current instance.
 
has(num)
The has method returns whether the specified number is include in the current rangeset instance
 
The toString method builds a string reprensentation of the current instances ranges
Class Detail
RXBuild.Utils.RangeSet(inverted)
Creates a new instance of RangeSet
Parameters:
{boolean} inverted
true if ranges added to this instance are to be considered excluded, otherwise false.
Field Detail
{Boolean} inverted
True if ranges contained in this instance are to be excluded

{Array} ranges
A sorted array of objects in the form {f: num, t: num} specifying inclusive bounds
Method Detail
add(range)
The add method adds the specified range to the current instance.
Parameters:
{Number|Range} range
A range (of the form {f: first_int, t: last_int}), or a single included number.

{boolean} has(num)
The has method returns whether the specified number is include in the current rangeset instance
Parameters:
{Number} num
The number to test for
Returns:
{boolean} true if the number is in the range set (or absent and the inverted property is true), otherwise false.

{string} toString()
The toString method builds a string reprensentation of the current instances ranges
Returns:
{string} A string representation of this instance (ex: "1, 4..6, 7..9")

Documentation generated by JsDoc Toolkit 2.0.2 on Mon May 02 2016 20:27:57 GMT+0200 (CEST)