An easier/cleaner/shorter way to create HashMaps

I found an easier way to create hashmaps in Rules DSL, e.g. for timers (but of course applies to any hashmaps). No need to import the java.util.Map

Instead of:

import java.util.Map
val Map<String, Timer> timers = newHashMap

One could do this:

// import java.util.Map // there is no need to import this
val timers = <String, Timer>newHashMap

I hope this is useful. @rlkoshak what do you think?

Seems like a nice way to do it.

I moved it to the Solutions category.

It should work with Lists and Sets too.