K
kelvSYC
How would one implement an ordered set in Java? That is, an
collection in which the elements are ordered (the List part) and
unique (the Set part).
It would be easy to, say, implement both List and Set, however, as the
Javadoc can tell you, the conflicting semantics would make this
impossible. So what kinds of alternatives is there?
collection in which the elements are ordered (the List part) and
unique (the Set part).
It would be easy to, say, implement both List and Set, however, as the
Javadoc can tell you, the conflicting semantics would make this
impossible. So what kinds of alternatives is there?