What is the best way to get value from java.util.Collection by index?
java.util.Collection
You must either wrap your collection in a list (new ArrayList(c)) or use c.toArray() since Collections have no notion of "index" or "order".
new ArrayList(c)
c.toArray()