collections - No random access method for Java Set -
i wonder why there no random access method get(object)
map
in java set
. in current implementation iterating whole collection seems unnecessary overhead.
> boolean contains(object o) returns true if set contains specified element.
(from https://docs.oracle.com/javase/7/docs/api/java/util/set.html)
Comments
Post a Comment