Reputation: 1819
A collection that can have duplicates and where the order matters is called a List.
A collection that can have duplicates and where the order doesn't matter is called a Bag.
A collection that cannot have duplicates and where the order doesn't matter is called a Set.
What then for the fourth combination; what would you call the class of collection that cannot have duplicates and where the order matters?
If you can link to an example of your suggested name (the more widely-used the better), please do so.
Upvotes: 0
Views: 112
Reputation: 403491
How about List-Ordered Set
.
Example: Java's Apache Commons Collections library (class docs) (now obsolete since Java introduced its own LinkedHashSet
class).
Upvotes: 0