java.util.Map.merge(key, value, BiFunction) The method Map.merge(key, value, BiFunction) associates given value with the given key or calculates the new value from the old value and the given one using provided remapping function.
java.util.Map.getOrDefault(key, defaultValue) The method Map.getOrDefault(key, defaultValue) returns mapped value for the given key or defaultValue if there is no such mapping.
java.util.Map.forEach(BiConsumer) The method Map.forEach(BiConsumer) performs the given action for each entry of the map until all are processed or exception is thrown.
Spring Constructor Injection This is one of the simplest and cleanest types of Dependency Injection in the Spring Framework. In this post we show how to use it with help of Spring annotations.
java.util.Map.computeIfPresent(Key, BiFunction) The method Map.computeIfPresent(Key, BiFunction) computes a new mapping for the given key and its current mapping value if the value exists and is not null.
java.util.Map.computeIfAbsent(key, Function) The method Map.computeIfAbsent(key, Function) computes the new value and associates it with the key if there is no mapping for the given key or the mapping is null. Returns the new value associated with the key.
java.util.Map.compute(Key, BiFunction) The method Map.compute(Key, BiFunction) returns the new value associated with the specified key. The value is computed using the given function.
java.time.Clock.tickSeconds(ZoneId) The method Clock.tickSeconds(ZoneId zone) returns a clock that will tick in seconds using the best available clock (usually system clock).
java.time.Clock.tick(Clock baseClock, Duration duration) The method Clock.tick(Clock, Duration) returns a clock that will return instants from given baseClock truncated to given duration.
java.time.Clock.systemUTC() The method Clock.systemUTC() returns a clock that will use the best available system clock to convert instant into date and time using UTC time-zone.