I\'ve got a HashSet with a bunch of Integers in it. I want to turn it into an array, but calling
HashSet
Integers
hashset.toArray();
You can just use Guava's:
Ints.toArray(Collection extends Number> collection)