intellij-postfix-templates
intellij-postfix-templates copied to clipboard
Extend for Duration and Period methods in java
java.time.Duration & java.time.Period have several static methods for converting int/long into Duration/Period. Would be nice to have postfix methods for those.
Thanks for the hint. I will add them.
Hm, but java.time.Duration needs 2 arguments and Period even 3. I'm not so sure about the usefulness of those templates. In case of JavaFX I added now templates for seconds, minutes, hours, ... so that you can easily convert a number to Duration.seconds(NUMBER). Here I clearly see the benefit. For java.util.Duration and Period I would not even know where the expression should be inserted (as first, second or third parameter) and how to name the templates.