Data Structures implementations in java