GrepResult
public record GrepResult(String error, List<GrepMatch> matches)
源码Source
io/agentscope/harness/agent/filesystem/model/GrepResult.java:26–39承载 Grep 结果数据的记录类型。位于 io.agentscope.harness.agent.filesystem.model 包。核心成员包括 error、matches、success、fail、isSuccess。
Result from abstract filesystem grep operations.
记录组件摘要Record Component Summary
| 组件Component | 类型Type | 说明Description |
|---|---|---|
error | String | 执行错误相关操作。 error message on failure, `null` on success |
matches | List<GrepMatch> | 执行 `matches` 方法。 list of grep matches on success, `null` on failure |
方法摘要Method Summary
| 方法Method | 说明Description |
|---|---|
public static GrepResult success(List<GrepMatch> matches)static | 设置成功。 Performs the success operation. |
public static GrepResult fail(String error)static | 设置该参数。 Performs the fail operation. |
public boolean isSuccess() | 判断是否成功。 Returns whether the success. |
记录组件详情Record Component Detail
error
String error执行错误相关操作。
error message on failure, null on success
源码Source
io/agentscope/harness/agent/filesystem/model/GrepResult.java:26–39matches
List<GrepMatch> matches执行 matches 方法。
list of grep matches on success, null on failure
源码Source
io/agentscope/harness/agent/filesystem/model/GrepResult.java:26–39方法详情Method Detail
success
public static GrepResult success(List<GrepMatch> matches)
static
设置成功。
Performs the success operation.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
matches | List<GrepMatch> | matches(类型 `List`)。The matches. |
GrepResult返回GrepResult。Returns grep result.
源码Source
io/agentscope/harness/agent/filesystem/model/GrepResult.java:28–30fail
public static GrepResult fail(String error)
static
设置该参数。
Performs the fail operation.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
error | String | 错误(类型 `String`)。The error. |
GrepResult返回GrepResult。Returns grep result.
源码Source
io/agentscope/harness/agent/filesystem/model/GrepResult.java:32–34isSuccess
public boolean isSuccess()
判断是否成功。
Returns whether the success.
boolean返回布尔值,表示判断结果。Returns a boolean result.
源码Source
io/agentscope/harness/agent/filesystem/model/GrepResult.java:36–38