PriorityMap
A map that visits higher priorities first and the most recently inserted value first within a priority. Replacing a value preserves its position; putting an existing key inserts it again. Traversal starts in constant time; insertion can take linear time. This map is not thread-safe. Its independent iterators support removal and are fail-fast on a best-effort basis after structural changes outside that iterator.
var animations = new PriorityMap<String, String>();
animations.put("idle", "idle animation", 0);
var iterator = animations.valueIterator();
while (iterator.hasNext()) {
if (iterator.next().isEmpty()) iterator.remove();
}
Content copied to clipboard
Since
3.0.0
Parameters
<K>
the type of keys maintained by this map
<V>
the type of mapped values