java.util.Collection and java.util.Set interfaces -
java.util.Collection and java.util.Set interfaces -
what's purpose of java.util.set interface if contains absolutely equal methods in comparing java.util.collection? there no prohibition multi-implementing in java, , set realization (hashset) work fine without set interfaces. why need useless baggage?
javadoc describing contract of collection
(emphasis mine):
a collection represents grouping of objects, known elements. some collections allow duplicate elements , others not.
on set
:
a collection contains no duplicate elements.
in other words, set
abstraction describes (ekhem!) subset of collection
s.
collections
Comments
Post a Comment