How does following code work in Akka:
@Override
public Receive createReceive() {
return receiveBuilder()
.match(DeviceManager.RequestTrackDevice.class, this::onTrackDevice)
.match(RequestDeviceList.class, this::onDeviceList)
.match(Terminated.class, this::onTerminated)
.build();
}
onTrackDevice is another method in same class and it takes an input. Here it is invoked without any argument. I understand that passed message would be passed to onTrackDevice too.
But how does it all fit in java syntax?