Use fluent API
Closed this issue · 2 comments
ZiglioUK commented
Simple change, make all setters "return this;" so we can chain initialization, for example:
goGPS = GoGPS.create(navigationIn, roverIn, masterIn)
.addPositionConsumerListener(kml)
.setDynamicModel(dynamicModel);
instead of
goGPS = new GoGPS(navigationIn, roverIn, masterIn);
goGPS.addPositionConsumerListener(kml);
goGPS.setDynamicModel(dynamicModel);
ege010 commented
Would be very nice!