Enumeration Class
A Typescript class representation of an ECEnumeration.
Extends
Methods
Name |
Description |
|
constructor(schema: Schema, name: string, primitiveType?: Integer | String): Enumeration |
|
|
addEnumerator(enumerator: AnyEnumerator): void Protected |
Adds enumerator to list of enumerators on this Enumeration |
|
createEnumerator(name: string, value: string | number, label?: string, description?: string): AnyEnumerator |
Creates an Enumerator with the provided name and value as well as optional parameters label and description |
|
fromJSON(enumerationProps: EnumerationProps): Promise<void> |
|
|
fromJSONSync(enumerationProps: EnumerationProps): void |
|
|
getEnumerator(value: string): undefined | Enumerator<string> |
Gets an enumerator that matches the value provided. |
|
getEnumerator(value: number): undefined | Enumerator<number> |
|
|
getEnumeratorByName(name: string): undefined | AnyEnumerator |
Gets an enumerator that matches the name provided. |
|
toJSON(standalone: booleanfalse, includeSchemaVersion: booleanfalse): EnumerationProps |
Save this Enumeration's properties to an object for serializing to JSON. |
|
Inherited methods
Name |
Inherited from |
Description |
equalByKey(thisSchemaItem: SchemaItem, thatSchemaItemOrKey?: SchemaItemKey | SchemaItem): boolean Static Inherited |
SchemaItem |
Indicates if the two SchemaItem objects are equal by comparing their respective key properties. |
parseFullName(fullName: string): [string, string] Static Inherited |
SchemaItem |
Parses the given full name, {schemaName}.{schemaItemName} or {schemaName}:{schemaItemName}, into two separate strings. |
Properties
Name |
Type |
Description |
|
_enumerators Protected |
AnyEnumerator[] |
|
|
_isStrict Protected |
boolean |
|
|
_type Protected |
Integer | String |
|
|
enumerators Accessor ReadOnly |
AnyEnumerator[] |
|
|
isInt Accessor ReadOnly |
boolean |
|
|
isStrict Accessor ReadOnly |
boolean |
|
|
isString Accessor ReadOnly |
boolean |
|
|
schemaItemType Readonly |
Enumeration |
|
|
type Accessor ReadOnly |
undefined | Integer | String |
|
|
Inherited properties
Defined in
Last Updated: 14 November, 2024