SyntaxFix
Write A Post
Hire A Developer
Questions
The only reason I can think of for using a numerical index in a set would be for iteration. For that, use
for(A a : set) { visit(a); }