import * as mr from './fp'; export declare type Initializer = string | number | (number | mr.Range)[] | MultiRange; /** * Parses and manipulates multiple integer ranges. * This class exists for compatibility purposes. * Prefer the function style API instead. */ export declare class MultiRange { private ranges; private options; /** * Creates a new MultiRange object. */ constructor(data?: Initializer, options?: mr.Options); /** * Clones this instance. * @returns The cloned instance. */ clone(): MultiRange; /** * Appends to this instance. * @param value - The data to append. */ append(value: Initializer): MultiRange; /** * Subtracts from this instance. * @param value - The data to subtract. */ subtract(value: Initializer): MultiRange; /** * Remove integers which are not included in `value`, * yielding the intersection of this and `value`. * @param value - The data to calculate the intersetion. */ intersect(value: Initializer): MultiRange; /** * Exports the whole range data as an array of arrays. * @returns An copied array of range segments. */ getRanges(): number[][]; /** * Checks if this instance contains the specified value. * @param value - Value to be checked. * @returns True if the specified value is included in the instance. */ has(value: Initializer): boolean; /** * Returns the number of range segments. * For example, the segmentLength of `2-5,7,9-11` is 3. * @returns The number of segments. Returns 0 for an empty instance. */ segmentLength(): number; /** * Calculates how many numbers are effectively included in this instance. * For example, the length of `1-10,51-60,90` is 21. * @returns The number of integer values in this instance. * Returns `Infinity` for an unbounded range. */ length(): number; /** * Checks if two instances of MultiRange are identical. * @param cmp - The data to compare. * @returns True if `cmp` is exactly the same as this instance. */ equals(cmp: Initializer): boolean; /** * Checks if the current instance is unbounded (i.e., infinite). */ isUnbounded(): boolean; /** * Returns the minimum integer contained in this insntance. * Can be -Infinity or undefined. * @returns The minimum integer of this instance. */ min(): number | undefined; /** * Returns the maximum number contained in this insntance. * Can be Infinity or undefined. * @returns The maximum integer of this instance. */ max(): number | undefined; /** * Removes the smallest integer from this instance and returns it. * @returns The minimum integer removed from this instance. */ shift(): number | undefined; /** * Removes the largest integer from this instance and returns it. * @returns The maximum integer removed from this instance. */ pop(): number | undefined; /** * Returns the string respresentation of this MultiRange. */ toString(): string; /** * Builds a flat array of integers which holds all elements in this instance. * Note that this may be slow and memory-consuming for large ranges. * Consider using the iterator whenever possible. */ toArray(): number[]; /** * Returns an ES6-compatible iterator. */ getIterator(): { next: () => { done?: boolean; value?: number; }; }; [Symbol.iterator](): Iterator; } export declare const multirange: (data?: Initializer, options?: mr.Options) => MultiRange;