- Companion:
- object
class Object
trait Matchable
class Any
Value members
Concrete methods
Null-safe implementation is preferred by using Option. The caller can support default value by using getOrElse: messages.get("hello").getOrElse("world")
Null-safe implementation is preferred by using Option. The caller can support default value by using getOrElse: messages.get("hello").getOrElse("world")
The return value can also be used with format: messages.get("hello %d").map(_.format(5))
To return the string itself: messages("hello")
- Value parameters:
- key
The key to find the message for