JavaWebStack / JavaWebStack/abstract-data

Add findFirst utility method

未關閉
#26 1 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

還沒有人認領這個 Issue。

enhancement
主要語言
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.

貢獻指南

這個儲存庫沒有索引到貢獻指南

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

研究方向

先定位 AbstractObject 和 AbstractArray,並閱讀它們如何表示巢狀元素。在兩個進入點中實作所要求的 findFirst(String key) 行為,遞迴搜尋巢狀物件和陣列;完成的標準是兩種類型都能不論結構如何找到所要求的鍵。

由索引模型根據 Issue 內容生成。

評估

技術堆疊
java
領域
backend
Issue 類型
功能
難度
3/5
預估耗時
1-2 天
活躍度
停滯
描述清晰度
基本清楚
新手友好度
45/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。