SetCollection
public abstract class SetCollection
源码Source
io/agentscope/runtime/common/collections/SetCollection.java:24–59设置集合,承载智能体的部署、调度与服务化运行。位于 io.agentscope.runtime.common.collections 包。核心成员包括 add、remove、contains、clear、toList。
Abstract base class for set collection implementations.
方法摘要Method Summary
| 方法Method | 说明Description |
|---|---|
public abstract boolean add(String value)abstract | 设置添加。 Adds a value to the set. |
public abstract void remove(String value)abstract | 设置移除。 Removes a value from the set. |
public abstract boolean contains(String value)abstract | 设置该参数。 Checks if the set contains a value. |
public abstract void clear()abstract | 清空或重置内部状态。 Clears all values from the set. |
public abstract List<String> toList()abstract | 转换设置到列出。 Converts the set to a list. |
方法详情Method Detail
add
public abstract boolean add(String value)
abstract
设置添加。
Adds a value to the set.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
value | String | 值到添加。The value to add |
boolean返回布尔值,表示判断结果。true if added, false if already present
源码Source
io/agentscope/runtime/common/collections/SetCollection.java:31remove
public abstract void remove(String value)
abstract
设置移除。
Removes a value from the set.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
value | String | 值到移除。The value to remove |
源码Source
io/agentscope/runtime/common/collections/SetCollection.java:38contains
public abstract boolean contains(String value)
abstract
设置该参数。
Checks if the set contains a value.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
value | String | 值到检查。The value to check |
boolean返回布尔值,表示判断结果。true if present, false otherwise
源码Source
io/agentscope/runtime/common/collections/SetCollection.java:46clear
public abstract void clear()
abstract
清空或重置内部状态。
Clears all values from the set.
源码Source
io/agentscope/runtime/common/collections/SetCollection.java:51toList
public abstract List<String> toList()
abstract
转换设置到列出。
Converts the set to a list.
List<String>所有值的列出。List of all values
源码Source
io/agentscope/runtime/common/collections/SetCollection.java:58