Class: Range

Range(fromValue, toValue, step)

An abstract class defining a range of numbers between 2 points inclusively divided by a step value.

Constructor

new Range(fromValue, toValue, step)

Create a new instance.
Parameters:
Name Type Default Description
fromValue number The lowest inclusive value in range
toValue number The highest inclusive value in range
step number 1 The internal unit size.
Source:

Members

fromValue

Get fromValue.
Source:

step

Get step unit.
Source:

toValue

Get toValue.
Source:

Methods

inRange(value) → {boolean}

Determine if a value is within this range. A TypeError is thrown when value is not a number. Subclasses should override and call this method for basic type checking.
Parameters:
Name Type Description
value number The number to check.
Source:
Returns:
- True if value satisfies the range; false otherwise.
Type
boolean

isValidType(parameterType) → {boolean}

Abstract method that determines if a ParameterType is compatible. Subclasses must implement this method.
Parameters:
Name Type Description
parameterType ParameterType The parameter type to test.
Source:
Returns:
- True if parameterType is compatible; otherwise return false.
Type
boolean