I want/need/would LOVE to have functionality on a Menu2 object that tells me WHICH identifiers/items it stores.
In my app I have logic that enables user supplied input as a menu item and also allows users to delete them. I see the refresh calls, but the deleted item still exists.. To work around it I keep some vars alive and such. But I would love to do it differently so I don't have to rely too much on (global) vars (see https://gitlab.com/waterkip/ciq-demo-watch-app/-/commit/203256a0882316826e6a4305de0dfdedb8197cf7 for what I mean).
Menu2 objects (perhaps even add them to other menu like objects) get the following methods:
* size(): returns the amount of menuItems. We can get an idex of an item, but we still don't know if the item is the last or the middle item because we lack size().
* getItemIds(): returns an array of itemIds (note, this is not the index, but the id that gets exposed as Item.getId()). This allows us to do intersecting on the array based on whatever data we have.