AS AgentScopeAPI 手册 / API Reference

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
valueString值到添加。The value to add
返回Returns boolean
返回布尔值,表示判断结果。true if added, false if already present
源码Source io/agentscope/runtime/common/collections/SetCollection.java:31

remove

public abstract void remove(String value)
abstract

设置移除。

Removes a value from the set.

参数Parameters
名称Name类型Type说明Description
valueString值到移除。The value to remove
源码Source io/agentscope/runtime/common/collections/SetCollection.java:38

contains

public abstract boolean contains(String value)
abstract

设置该参数。

Checks if the set contains a value.

参数Parameters
名称Name类型Type说明Description
valueString值到检查。The value to check
返回Returns boolean
返回布尔值,表示判断结果。true if present, false otherwise
源码Source io/agentscope/runtime/common/collections/SetCollection.java:46

clear

public abstract void clear()
abstract

清空或重置内部状态。

Clears all values from the set.

源码Source io/agentscope/runtime/common/collections/SetCollection.java:51

toList

public abstract List<String> toList()
abstract

转换设置到列出。

Converts the set to a list.

返回Returns List<String>
所有值的列出。List of all values
源码Source io/agentscope/runtime/common/collections/SetCollection.java:58
基于官方固定版本源码静态生成Generated from pinned official sources · Python 2.0.11 · Java 2.0.4
签名与文档为静态抽取;如有疑问请以源码为准。Signatures and docs are extracted statically; verify against the source when in doubt.