private Map<String, Client> clients;
public Map<String, Client> getClients() {
return clients;
}
public void setClients(Map<String, Client> clients) {
this.clients = clients;
}
Kotlin's approach, where you declare and instantiate a property, and the getter/setter/backing storage are synthesized for you, is vastly preferable to me: public var clients = emptyMap<String, Client>()Setters are needed in exceedingly rarely circumstances.
Just saying, kotlin wasn't just a more aesthetically pleasing java, there were some deeper benefits as far as i can tell.