EM implements PriorityQueue interface instead of inheriting it.