* @return the collection of this node's children in an unspecified order
*/
public Collection<T> getNodes() {
- return children.values();
+ return children.isEmpty() ? Collections.emptyList() : (Collection<T>) children.values();
}
public int getNodeCount() {