Skip to content
This repository has been archived by the owner on Nov 30, 2022. It is now read-only.

Latest commit

 

History

History
402 lines (234 loc) · 10.3 KB

enumcollection.md

File metadata and controls

402 lines (234 loc) · 10.3 KB

simpli-web-sdk > EnumCollection

Class: EnumCollection

Type parameters

E

T

Hierarchy

Collection

↳ EnumCollection

Implements

Index

Constructors

Properties

Accessors

Methods


Constructors

constructor

new EnumCollection(enumType: EnumType<E>, i18nPath?: undefined | string): EnumCollection

Overrides Collection.constructor

Defined in app/collection/EnumCollection.ts:6

Parameters:

Name Type
enumType EnumType<E>
Optional i18nPath undefined | string

Returns: EnumCollection


Properties

<Protected> items

● items: IResource[]

Overrides Collection.items

Defined in app/collection/EnumCollection.ts:12


Accessors

lodash

get lodash(): LoDashExplicitWrapper<T[]>

Inherited from Collection.lodash

Defined in app/collection/Collection.ts:10

Returns: LoDashExplicitWrapper<T[]>


Methods

add

add(item: T, index?: undefined | number): void

Inherited from Collection.add

Defined in app/collection/Collection.ts:30

Parameters:

Name Type
item T
Optional index undefined | number

Returns: void


addResource

addResource(id: ID, tag: TAG, index?: undefined | number): void

Implementation of IResourceCollection.addResource

Defined in app/collection/EnumCollection.ts:26

Parameters:

Name Type
id ID
tag TAG
Optional index undefined | number

Returns: void


all

all(): T[]

Inherited from Collection.all

Defined in app/collection/Collection.ts:14

Returns: T[]


allWithPlaceholder

allWithPlaceholder(placeholder?: string | null): Array<IResource | null>

Implementation of IResourceCollection.allWithPlaceholder

Defined in app/collection/EnumCollection.ts:14

Parameters:

Name Type Default value
Default value placeholder string | null null

Returns: Array<IResource | null>


appendResource

appendResource(id: ID, tag: TAG): this

Implementation of IResourceCollection.appendResource

Defined in app/collection/EnumCollection.ts:43

Parameters:

Name Type
id ID
tag TAG

Returns: this


first

first(): T

Inherited from Collection.first

Defined in app/collection/Collection.ts:22

Returns: T


get

get(index: number): T

Inherited from Collection.get

Defined in app/collection/Collection.ts:18

Parameters:

Name Type
index number

Returns: T


getManyResource

getManyResource(ids: ID[]): IResource[]

Implementation of IResourceCollection.getManyResource

Defined in app/collection/EnumCollection.ts:22

Parameters:

Name Type
ids ID[]

Returns: IResource[]


getResource

getResource(id: ID | null): IResource | null

Implementation of IResourceCollection.getResource

Defined in app/collection/EnumCollection.ts:18

Parameters:

Name Type
id ID | null

Returns: IResource | null


isEmpty

isEmpty(): boolean

Inherited from Collection.isEmpty

Defined in app/collection/Collection.ts:49

Returns: boolean


isNotEmpty

isNotEmpty(): boolean

Inherited from Collection.isNotEmpty

Defined in app/collection/Collection.ts:53

Returns: boolean


last

last(): T

Inherited from Collection.last

Defined in app/collection/Collection.ts:26

Returns: T


prependNullResource

prependNullResource(tag: TAG, useI18n?: boolean): this

Implementation of IResourceCollection.prependNullResource

Defined in app/collection/EnumCollection.ts:39

Parameters:

Name Type Default value
tag TAG -
Default value useI18n boolean true

Returns: this


prependResource

prependResource(id: ID, tag: TAG): this

Implementation of IResourceCollection.prependResource

Defined in app/collection/EnumCollection.ts:34

Parameters:

Name Type
id ID
tag TAG

Returns: this


remove

remove(item: T): void

Inherited from Collection.remove

Defined in app/collection/Collection.ts:38

Parameters:

Name Type
item T

Returns: void


removeResource

removeResource(id: ID): void

Implementation of IResourceCollection.removeResource

Defined in app/collection/EnumCollection.ts:30

Parameters:

Name Type
id ID

Returns: void


size

size(): number

Inherited from Collection.size

Defined in app/collection/Collection.ts:45

Returns: number