PortionCollection
概述
PortionCollection 是 Aspose.Slides FOSS 中用于 Java 的类。继承自:IPortionCollection。
表示段落中一组文本片段。
此类提供 16 个方法,用于在 Java 程序中处理 PortionCollection 对象。可用的方法包括:PortionCollection、add、asIEnumerable、clear、contains、count、get、indexOf、insert、isReadOnly、iterator、remove,以及另外 2 个方法。所有公共成员在安装 Aspose.Slides FOSS for Java 包后,对任何 Java 应用程序均可访问。属性:readOnly。
属性
| 名称 | 类型 | 访问 | 描述 |
|---|---|---|---|
readOnly | boolean | 读取 | 获取只读。 |
方法
| 签名 | 描述 |
|---|---|
PortionCollection() | 创建一个空的 PortionCollection。 |
PortionCollection(portions: List<IPortion>) | 创建一个包含给定初始部分的 PortionCollection。 |
PortionCollection(pElement: Element, saveCallback: Runnable) | 创建一个基于 XML 的 PortionCollection。 |
get(index: int) → IPortion | 返回指定索引处的 IPortion |
size() → int | |
count() → int | 返回部分的数量(size 的别名) |
isReadOnly() → boolean | 如果已设置只读,则返回 true。 |
asIEnumerable() → Iterable<IPortion> | 提供一个可迭代对象用于遍历这些部分 |
add(value: IPortion) | 将一个部分追加到集合的末尾 |
indexOf(item: IPortion) → int | 返回指定部分的索引或 -1 |
insert(index: int, value: IPortion) | 在给定索引处插入一个部分 |
clear() | |
contains(item: IPortion) → boolean | 检查集合是否包含指定的部分 |
remove(item: IPortion) → boolean | 删除该部分的首次出现并返回成功 |
removeAt(index: int) | 删除给定索引处的部分 |
iterator() → Iterator<IPortion> | 返回一个遍历部分的迭代器 |