simpli-web-sdk > EnumCollection
↳ EnumCollection
- add
- addResource
- all
- allWithPlaceholder
- appendResource
- first
- get
- getManyResource
- getResource
- isEmpty
- isNotEmpty
- last
- prependNullResource
- prependResource
- remove
- removeResource
- size
⊕ 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
● items: IResource[]
Overrides Collection.items
Defined in app/collection/EnumCollection.ts:12
get lodash(): LoDashExplicitWrapper
<T
[]>
Inherited from Collection.lodash
Defined in app/collection/Collection.ts:10
Returns: LoDashExplicitWrapper
<T
[]>
▸ 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(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(): T
[]
Inherited from Collection.all
Defined in app/collection/Collection.ts:14
Returns: T
[]
▸ 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(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(): T
Inherited from Collection.first
Defined in app/collection/Collection.ts:22
Returns: T
▸ get(index: number
): T
Inherited from Collection.get
Defined in app/collection/Collection.ts:18
Parameters:
Name | Type |
---|---|
index | number |
Returns: T
▸ getManyResource(ids: ID[]): IResource[]
Implementation of IResourceCollection.getManyResource
Defined in app/collection/EnumCollection.ts:22
Parameters:
Name | Type |
---|---|
ids | ID[] |
Returns: IResource[]
▸ 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(): boolean
Inherited from Collection.isEmpty
Defined in app/collection/Collection.ts:49
Returns: boolean
▸ isNotEmpty(): boolean
Inherited from Collection.isNotEmpty
Defined in app/collection/Collection.ts:53
Returns: boolean
▸ last(): T
Inherited from Collection.last
Defined in app/collection/Collection.ts:26
Returns: T
▸ 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(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(item: T
): void
Inherited from Collection.remove
Defined in app/collection/Collection.ts:38
Parameters:
Name | Type |
---|---|
item | T |
Returns: void
▸ removeResource(id: ID): void
Implementation of IResourceCollection.removeResource
Defined in app/collection/EnumCollection.ts:30
Parameters:
Name | Type |
---|---|
id | ID |
Returns: void
▸ size(): number
Inherited from Collection.size
Defined in app/collection/Collection.ts:45
Returns: number