Java Programming Tutorials

Java programming tutorials with many code examples!

Java Util Map computeIfPresent(Key,BiFunction)

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.

Read More

Share with the World!

Java Util Map computeIfAbsent(key,Function)

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.

Read More

Share with the World!

Java Util Map compute(Key, BiFunction)

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.

Read More

Share with the World!

Java Time Clock tick(Clock,Duration)

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.

Read More

Share with the World!

Java Time Clock systemUTC

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.

Read More

Share with the World!

Java Time Clock systemDefaultZone

java.time.Clock.systemDefaultZone()

The method Clock.systemDefaultZone() returns a clock that will use the best available system clock to convert instant into date and time using default time-zone.

Read More

Share with the World!

Java Time Clock offset(Clock,Duration)

java.time.Clock.offset(Clock,Duration)

The method java.time.Clock.offset(Clock,Duration) returns a wrapper around given Clock with the specified Duration added. This clock implementation allows easily to jump into the past and future.

Read More

Share with the World!

Java Time ZoneId getAvailableZoneIds

java.time.ZoneId.getAvailableZoneIds()

The method ZoneId.getAvailableZoneIds() returns set of available zone IDs, including all available region-based IDs. Usually passed to of(String zoneId) to create ZoneId.

Read More

Share with the World!

Java Time Clock system(ZoneId)

java.time.Clock.system(ZoneId zone)

The method java.time.Clock.system(ZoneId zone) a clock that uses the best available system clock in the specified zone – never null.

Read More

Share with the World!