Skip to content

Instantly share code, notes, and snippets.

View jorgenpt's full-sized avatar

Jørgen Tjernø jorgenpt

View GitHub Profile
public <T> Bag<T> register(Class<T extends Node> klass) {
Bag<T> list = (Bag<T>)nodes.get(klass);
if(list == null) {
list = new Bag<T>();
nodes.put(klass, list);
}
return list;
}