remove duplicates from arraylist in java without using set