JavaWebStack / JavaWebStack/abstract-data
Add findFirst utility method
- 主要语言
- Java
- 星标
- 1
- 派生
- 1
- PR 合并指标
- 30 天内没有已合并 PR
描述
**Is your feature request related to a problem? Please describe.**
When you want to find a value just by the key, but don't care about the structure, you most likely write a recursive method to do that for you. So I think it would be good to include this utility method into the project.
**Describe the solution you'd like**
Basically a recursive method for both `AbstractObject` and `AbstractArray`.
`AbstractElement findFirst(String key)`
The method should be on AbstractArray as well, because an AbstractArray could contain objects which contain the key I want to search for.
贡献指南
这个仓库没有索引到贡献指南
调研方向
首先定位 AbstractObject 和 AbstractArray,并阅读它们如何表示嵌套元素。在两个入口点中实现所要求的 findFirst(String key) 行为,递归搜索嵌套对象和数组;完成的标准是两种类型都能无论结构如何找到所请求的键。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- java
- 领域
- backend
- Issue 类型
- 功能
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 45/100