Java simple treeset simulation 319ms

```
class TaskManager {
    TreeSet<Node> ts; // custom priority order 
    Map<Integer, Node> m; // map taskId with node data
    
    public TaskManager(List<List<Integer>> tasks) {
        m = new HashMap();
        ts = new TreeSet() {{
            for(List<Integer> task: tasks) {
                Node node = new Node(task.get(0), task.get(1), task.get(2));
                m.put(task.get(1), node);
                add(node);
            }
        }};
    }
    
    public void add(int userId, int taskId, int priority) {
        Node node = new Node(userId, taskId, priority);
        ts.add(node);
        m.put(taskId, node);
    }
    
    public void edit(int taskId, int newPriority) {
        Node cur = m.get(taskId);
        ts.remove(cur);
        m.remove(taskId);
        cur.priority = newPriority;
        ts.add(cur);
        m.put(taskId, cur);
    }
    
    public void rmv(int taskId) {
        Node cur = m.get(taskId);
        ts.remove(cur);
        m.remove(taskId);
    }
    
    public int execTop() {
        return ts.isEmpty() ? -1 : ts.pollFirst().userId;
    }
    
     class Node implements Comparable<Node> {
        int userId, taskId, priority;

        Node(int userId, int taskId, int priority) {
            this.userId = userId;
            this.taskId = taskId;
            this.priority = priority;
        }

        @Override
        public int compareTo(Node y) {
            if (priority != y.priority) return Integer.compare(y.priority, priority); // highest priority
            if (taskId != y.taskId) return Integer.compare(y.taskId, taskId); // highest taskId
            return Integer.compare(userId, y.userId);
        }
    }
}
```
['Ordered Map', 'Heap (Priority Queue)', 'Ordered Set', 'Java']