Options
All
  • Public
  • Public/Protected
  • All
Menu

Class OnmsEnum<T>

Represents an enumerated type.

Type parameters

  • T

Hierarchy

Index

Constructors

Properties

Accessors

Methods

Constructors

constructor

  • new OnmsEnum(id: T, label: string): OnmsEnum
  • construct an enum object with an id and label

    Parameters

    • id: T
    • label: string

    Returns OnmsEnum

Properties

Private i

i: T

the internal index/id

Private l

l: string

the type/label

Accessors

id

  • get id(): T
  • get the index/id of this enum entry

    Returns T

index

  • get index(): T
  • an alias for OnmsEnum.id

    Returns T

label

  • get label(): string
  • get the label of this enum entry

    Returns string

Methods

toDisplayString

  • toDisplayString(): string
  • convert this enum to a string suitable for display

    Returns string

toJSON

  • toJSON(): object
  • convert to the JSON representation

    Returns object

    • id: T
    • label: string

toString

  • toString(): T
  • convert this enum to a string

    Returns T

Generated using TypeDoc