Can someone suggest me a datatype/structure in java that satisfies: 1) no fixed size 2) does not automatically sort data. Data should be stored in the order in which it arrives 3) it should store only unique entries 4) its elements are accessible or atleast the first element should be!
links are not able to maintain unique entries. I tried working with Sets but it changes the order of my data automatically which i dont want to let happen. So i am now trying to work my way with LinkedHashSet, but I am not able to find the exact way to access the first element of the same for comparision.
Any suggestions please. Thanks!
set.iterator().next().