AS AgentScopeAPI 手册 / API Reference

Mapping

public abstract class Mapping
源码Source io/agentscope/runtime/common/collections/Mapping.java:24–55

Mapping,承载智能体的部署、调度与服务化运行。位于 io.agentscope.runtime.common.collections 包。核心成员包括 set、get、delete、scan。

Abstract base class for key-value mapping implementations.

方法摘要Method Summary

方法Method说明Description
public abstract void set(String key, Object value)
abstract
执行设置相关操作。
Sets a key-value pair.
public abstract Object get(String key)
abstract
获取值用于密钥。
Gets the value for a key.
public abstract void delete(String key)
abstract
删除数据。
Deletes a key-value pair.
public abstract List<String> scan(String prefix)
abstract
设置该参数。
Scans for keys with the given prefix.

方法详情Method Detail

set

public abstract void set(String key, Object value)
abstract

执行设置相关操作。

Sets a key-value pair.

参数Parameters
名称Name类型Type说明Description
keyString密钥。The key
valueObject值(as 映射)。The value (as a Map)
源码Source io/agentscope/runtime/common/collections/Mapping.java:31

get

public abstract Object get(String key)
abstract

获取值用于密钥。

Gets the value for a key.

参数Parameters
名称Name类型Type说明Description
keyString密钥。The key
返回Returns Object
返回对象。The value, or null if not found
源码Source io/agentscope/runtime/common/collections/Mapping.java:39

delete

public abstract void delete(String key)
abstract

删除数据。

Deletes a key-value pair.

参数Parameters
名称Name类型Type说明Description
keyString密钥到删除。The key to delete
源码Source io/agentscope/runtime/common/collections/Mapping.java:46

scan

public abstract List<String> scan(String prefix)
abstract

设置该参数。

Scans for keys with the given prefix.

参数Parameters
名称Name类型Type说明Description
prefixStringprefix(类型 `String`)。The prefix to match
返回Returns List<String>
返回列出。List of matching keys
源码Source io/agentscope/runtime/common/collections/Mapping.java:54
基于官方固定版本源码静态生成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.