Pair
public record Pair<T, U>(T first, U second)
源码Source
io/agentscope/core/memory/autocontext/Pair.java:33承载 Pair数据的记录类型。位于 io.agentscope.core.memory.autocontext 包。核心成员包括 first、second。
Generic pair record to hold two values of potentially different types.
This record is used throughout AutoContextMemory to represent pairs of related values, such as start and end indices for message ranges, or other paired data structures.
Common usage examples:
-
Message index ranges:
Pair<Integer, Integer>for (startIndex, endIndex) -
User-assistant pairs:
Pair<Integer, Integer>for (userIndex, assistantIndex)
记录组件摘要Record Component Summary
| 组件Component | 类型Type | 说明Description |
|---|---|---|
first | T | 执行第一个相关操作。 Performs the first operation. |
second | U | 执行 `second` 方法。 Performs the second operation. |
记录组件详情Record Component Detail
first
T first执行第一个相关操作。
Performs the first operation.
源码Source
io/agentscope/core/memory/autocontext/Pair.java:33second
U second执行 second 方法。
Performs the second operation.
源码Source
io/agentscope/core/memory/autocontext/Pair.java:33