# Class: com.pnfsoftware.jeb.util.primitives.IntegerRanges

Collection of integer ranges \(a range is noted `[beg, end)` or `[beg, end[`\).

## Constructor: IntegerRanges
- parameter: `mergeRanges`, type: `boolean`

Description: Create an empty range collection.
parameter: mergeRanges: true to merge adjacent ranges automatically

## Method: add
- parameter: `beg`, type: `int`
- parameter: `end`, type: `int`

Description: Add a non\-empty range.
parameter: beg: inclusive range start
parameter: end: exclusive range end

## Method: count
- return type: `int`

Description: Count the number of stored ranges.
return: the range count

## Method: isInsideRange
- parameter: `v`, type: `int`
- parameter: `range`, type: `int[]`
- return type: `boolean`

Description: Determine whether a value belongs to one of the stored ranges.
parameter: v: value to test
parameter: range: optional two\-element output array receiving the containing range
return: true if the value is inside a stored range

## Method: toString
- return type: `java.lang.String`


