Yet Another Java generic tree