Uses of Interface
cloud.opencode.base.tree.result.TreeResult
Packages that use TreeResult
-
Uses of TreeResult in cloud.opencode.base.tree.result
Classes in cloud.opencode.base.tree.result that implement TreeResultModifier and TypeClassDescriptionstatic final recordEmpty Result 空结果static final recordFailure Result 失败结果static final recordSuccess Result 成功结果static final recordValidation Result 验证结果Methods in cloud.opencode.base.tree.result that return TreeResultModifier and TypeMethodDescriptionstatic <T> TreeResult<T> TreeResult.empty()Create an empty result 创建空结果static <T> TreeResult<T> Create a failure result 创建失败结果static <T> TreeResult<T> Create a failure result with cause 创建带原因的失败结果default <U> TreeResult<U> TreeResult.flatMap(Function<? super T, ? extends TreeResult<U>> mapper) Transform the value with a function that returns a TreeResult 使用返回TreeResult的函数转换值static <T> TreeResult<T> TreeResult.fromCallable(Callable<T> callable) Create a result from a callable 从Callable创建结果static <T> TreeResult<T> TreeResult.fromNullable(T value) Create a result from nullable value 从可空值创建结果static <T> TreeResult<T> TreeResult.fromOptional(Optional<T> optional) Create a result from Optional 从Optional创建结果default <U> TreeResult<U> Transform the value if present 如果存在则转换值default TreeResult<T> Execute action if empty 如果为空则执行操作default TreeResult<T> Execute action if failure 如果失败则执行操作default TreeResult<T> Execute action if success 如果成功则执行操作default TreeResult<T> TreeResult.onValidation(Consumer<? super List<TreeResult.Violation>> action) Execute action if validation failure 如果验证失败则执行操作default TreeResult<T> Recover from failure with an alternative value 从失败中恢复为替代值default TreeResult<T> TreeResult.recoverWith(Function<? super String, ? extends TreeResult<T>> recoveryFunction) Recover from failure with an alternative TreeResult 从失败中恢复为替代TreeResultstatic <T> TreeResult<T> TreeResult.success(T data) Create a success result 创建成功结果static <T> TreeResult<T> TreeResult.validation(TreeResult.Violation violation) Create a validation result with single violation 创建单个违规的验证结果static <T> TreeResult<T> TreeResult.validation(List<TreeResult.Violation> violations) Create a validation result 创建验证结果Method parameters in cloud.opencode.base.tree.result with type arguments of type TreeResultModifier and TypeMethodDescriptiondefault <U> TreeResult<U> TreeResult.flatMap(Function<? super T, ? extends TreeResult<U>> mapper) Transform the value with a function that returns a TreeResult 使用返回TreeResult的函数转换值default TreeResult<T> TreeResult.recoverWith(Function<? super String, ? extends TreeResult<T>> recoveryFunction) Recover from failure with an alternative TreeResult 从失败中恢复为替代TreeResult