import org.ops4j.pax.swissbox.collections.*;
List<String> list = FastList.newInstance();
list.add("Element 1");
list.add("Element 2");
// ...
for (String element : list) {
}
FastList.<String>freeInstance(list);
import org.ops4j.pax.swissbox.collections.*;
Set<String> set = FastSet.newInstance();
set.add("Element 1");
set.add("Element 2");
// ...
for (String element : set) {
}
FastSet.<String>freeInstance(set);
import org.ops4j.pax.swissbox.collections.*;
Map<String, Integer> map = FastMap.newInstance();
map.put("Key 1", 1);
map.put("Key 2", 2);
// ...
for (Map.Entry<String, Integer> entry : map.entrySet()) {
String key = entry.getKey();
Integer value = entry.getValue();
}
FastMap.<String, Integer>freeInstance(map);