[]
Sheets.GanttSheet.Collection
| Name |
|---|
T |
• new Collection<T>()
创建 Collection 的实例。
classdesc 对象的集合。
| Name |
|---|
T |
▸ add(item): void
将项目添加到列表中。
| Name | Type | Description |
|---|---|---|
item |
T |
要添加的项目。 |
void
▸ all(): T[]
获取集合中的所有项目。
T[]
集合项目列表。
▸ clear(): void
从列表中移除所有项目。
void
▸ getIndexByItem(item): number
从集合列表中获取项目索引。
| Name | Type | Description |
|---|---|---|
item |
T |
集合中的项目。 |
number
项目在集合列表中的索引。
▸ getItemAt(index): T
获取对应索引的项目。
| Name | Type | Description |
|---|---|---|
index |
number |
集合列表索引。 |
T
具有指定名称的规则。
▸ getRule(name): null | T
获取具有指定名称的项目。
| Name | Type | Description |
|---|---|---|
name |
string |
表示规则名称的字符串值。 |
null | T
具有指定名称的规则。
▸ insert(item): void
将项目插入到列表中。
| Name | Type | Description |
|---|---|---|
item |
T |
要插入的项目。 |
void
▸ length(): number
获取集合列表的长度。
number
集合列表的长度。
▸ remove(item): void
从列表中移除项目。
| Name | Type | Description |
|---|---|---|
item |
T |
要移除的项目。 |
void
▸ removeAt(index): void
从索引中删除对应的项目。
| Name | Type | Description |
|---|---|---|
index |
number |
集合列表索引。 |
void
▸ setItemAt(index, item): void
将项目设置到索引位置。
| Name | Type | Description |
|---|---|---|
index |
number |
要插入的索引。 |
item |
T |
项目。 |
void