Java equivalent of C++ std::map?
- by Rudiger
I'm looking for a Java class with the characteristics of C++ std::map's usual implementation (as I understand it, a self-balancing binary search tree):
O(log n) performance for insertion/removal/search
Each element is composed of a unique key and a mapped value
Keys follow a strict weak ordering
I'm looking for implementations with open source or design documents; I'll probably end up rolling my own support for primitive keys/values.
This question's style is similar to: Java equivalent of std::deque, whose answer was "ArrayDeque from Primitive Collections for Java".