Skip to main content
Version: 3.x

Class: NumericRange

@cognite/reveal.NumericRange

Constructors

constructor

new NumericRange(from, count)

Parameters

NameType
fromnumber
countnumber

Defined in

packages/utilities/src/NumericRange.ts:10

Properties

count

Readonly count: number

Defined in

packages/utilities/src/NumericRange.ts:7


from

Readonly from: number

Defined in

packages/utilities/src/NumericRange.ts:6


toInclusive

Readonly toInclusive: number

Defined in

packages/utilities/src/NumericRange.ts:8

Methods

contains

contains(value): boolean

Parameters

NameType
valuenumber

Returns

boolean

Defined in

packages/utilities/src/NumericRange.ts:38


equal

equal(other): boolean

Parameters

NameType
otherNumericRange

Returns

boolean

Defined in

packages/utilities/src/NumericRange.ts:34


forEach

forEach(action): void

Parameters

NameType
action(value: number) => void

Returns

void

Defined in

packages/utilities/src/NumericRange.ts:72


intersectionWith

intersectionWith(range): NumericRange

Parameters

NameType
rangeNumericRange

Returns

NumericRange

Defined in

packages/utilities/src/NumericRange.ts:50


intersects

intersects(range): boolean

Parameters

NameType
rangeNumericRange

Returns

boolean

Defined in

packages/utilities/src/NumericRange.ts:42


intersectsOrCoinciding

intersectsOrCoinciding(range): boolean

Parameters

NameType
rangeNumericRange

Returns

boolean

Defined in

packages/utilities/src/NumericRange.ts:46


isInside

isInside(range): boolean

Parameters

NameType
rangeNumericRange

Returns

boolean

Defined in

packages/utilities/src/NumericRange.ts:61


toArray

toArray(): number[]

Returns

number[]

Defined in

packages/utilities/src/NumericRange.ts:30


toString

toString(): string

Returns

string

Defined in

packages/utilities/src/NumericRange.ts:78


union

union(range): NumericRange

Parameters

NameType
rangeNumericRange

Returns

NumericRange

Defined in

packages/utilities/src/NumericRange.ts:65


values

values(): Generator<number, any, unknown>

Returns

Generator<number, any, unknown>

Defined in

packages/utilities/src/NumericRange.ts:24


createFromInterval

Static createFromInterval(from, toInclusive): NumericRange

Parameters

NameType
fromnumber
toInclusivenumber

Returns

NumericRange

Defined in

packages/utilities/src/NumericRange.ts:20


isNumericRange

Static isNumericRange(value): value is NumericRange

Parameters

NameType
valueany

Returns

value is NumericRange

Defined in

packages/utilities/src/NumericRange.ts:82