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. sets 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

Popular posts from this blog

delphi - How to convert bitmaps to video? -

jasper reports - Fixed header in Excel using JasperReports -

python - ('The SQL contains 0 parameter markers, but 50 parameters were supplied', 'HY000') or TypeError: 'tuple' object is not callable -