maya-dates

@drewsonne/maya-dates / Exports / Cycle

Class: Cycle

Hierarchy

Table of contents

Constructors

Properties

Methods

Constructors

constructor

Protected new Cycle(value, lookup, generator)

Parameters

Name Type
value string | number | Wildcard
lookup HashMap
generator (cycleName: string | number | Wildcard) => Wildcard | Cycle

Overrides

Base.constructor

Defined in

cr/component/cycle.ts:18

Properties

cycleLength

Protected cycleLength: number

Defined in

cr/component/cycle.ts:16


generator

Protected generator: (cycleName: string | number) => Wildcard | Cycle

Type declaration

▸ (cycleName): Wildcard | Cycle

Parameters
Name Type
cycleName string | number
Returns

Wildcard | Cycle

Defined in

cr/component/cycle.ts:15


nextHolder

Private nextHolder: null | Cycle

A cache of the next object in the cycle

Defined in

cr/component/cycle.ts:10


position

position: number

Absolute position within the linear cycle for this object.

Defined in

cr/component/cycle.ts:14


value

Protected value: any

Inherited from

Base.value

Defined in

cr/component/base.ts:5

Methods

isWildcard

isWildcard(): boolean

Returns

boolean

Inherited from

Base.isWildcard

Defined in

cr/component/base.ts:11


next

next(): Cycle

Return the next object in the cycle

Returns

Cycle

Defined in

cr/component/cycle.ts:42


nextCalculator

Private nextCalculator(): Cycle

Returns

Cycle

Defined in

cr/component/cycle.ts:57


shift

shift(incremental): Cycle

Move an incremental number of steps in the cycle, and return the object found there.

Parameters

Name Type Description
incremental number The number of steps to move through in the cycle.

Returns

Cycle

Defined in

cr/component/cycle.ts:50


toString

toString(): string

Render this cycle object as a string

Returns

string

Overrides

Base.toString

Defined in

cr/component/cycle.ts:78


validate

Abstract validate(): boolean

Returns

boolean

Defined in

cr/component/cycle.ts:82