Data structure implementations in Java