Prefix-Region Tree in Java