JavaWebStack / JavaWebStack/abstract-data
Add findFirst utility method
還沒有人認領這個 Issue。
- 主要語言
- 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.
貢獻指南
這個儲存庫沒有索引到貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
研究方向
先定位 AbstractObject 和 AbstractArray,並閱讀它們如何表示巢狀元素。在兩個進入點中實作所要求的 findFirst(String key) 行為,遞迴搜尋巢狀物件和陣列;完成的標準是兩種類型都能不論結構如何找到所要求的鍵。
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- java
- 領域
- backend
- Issue 類型
- 功能
- 難度
- 3/5
- 預估耗時
- 1-2 天
- 活躍度
- 停滯
- 描述清晰度
- 基本清楚
- 新手友好度
- 45/100