private static ImmutableMap<Event.Type, Event> toImmutableMap(Collection<Event> events) {
        ImmutableMap.Builder<Event.Type, Event> builder = new ImmutableMap.Builder<>();
        for (Event event : events)
            builder.put(event.type(), event);
        return builder.build();
    }
An immutable record of the last event of each type happening to this node, and a chronological log of the events.

Note that the history cannot be used to find the nodes current state - it will have a record of some
event happening in the past even if that event is later undone.

@author bratseth
node-repository/src/main/java/com/yahoo/vespa/hosted/provision/node/History.java