java - How to reference a position in a Set? -
how can reference position within set? array: array[5];
i developing android soundboard has favorites tab. favorites tab uses listview . when user adds favorite, text of button added set. have setup contextmenu list view allow user delete item long pressing, , pushing delete. context menu passes position of list view triggered context menu , trying delete position.
you cannot. set
s have no notion of order, concrete implementations may.
however, sets implement toarray()
, and
if set makes guarantees order elements returned iterator, method must return elements in same order.
what's underlying data structure?
Comments
Post a Comment