Hierarchy

Constructors

Properties

cursor: number
default: number | (() => number)
enumObject: any
values: Music[]

Methods

  • Filters the valid enum entries. This causes the internal list of enum entries to be refreshed. If the cursor has been set previously, it will likely be moved to a different entry.

    Parameters

    • filter: ((name: string, value: Music) => boolean)

      A function that takes a name and enum value and returns whether the entry should be included.

        • (name: string, value: Music): boolean
        • Parameters

          • name: string
          • value: Music

          Returns boolean

    Returns default

  • Returns the entry at the cursor position.

    Returns Music

  • Retrieves a random cursor position

    Returns number

  • If the given amount is positive, moves forward that many entries. If the given amount is negative, moves backward that many entries.

    Returns

    The entry at the new cursor position.

    Parameters

    • amt: number

    Returns Music

  • Sets the cursor position.

    Parameters

    • n: number

    Returns default

  • Moves to the default cursor position.

    Returns Music

  • Sets the cursor position to the position of this enum entry in the filtered list.

    Returns

    The entry at the new cursor position.

    Parameters

    Returns Music

  • Moves the cursor to a random entry, then returns that entry.

    Returns Music

  • Moves the cursor forward one entry, and returns the new entry.

    Returns Music

  • Moves the cursor backward one entry, and returns the new entry.

    Returns Music

  • Refreshes the internal list of enum entries. If the full enumeration has changed, the cursor may be moved to a different entry.

    Returns default

  • Sets the default cursor position.

    Parameters

    • n: number

    Returns default

  • Sets a handler for retrieving the default cursor position.

    Parameters

    • generator: (() => number)
        • (): number
        • Returns number

    Returns default

  • Sets a handler for retrieving the default cursor position to a pre-implemented method by EnumCursorDefaultGenerator entry.

    Parameters

    Returns default

  • Sets the default cursor position to the position of the given entry in this cursor.

    Parameters

    Returns default

Generated using TypeDoc