geometry-api-java
geometry-api-java copied to clipboard
Make public void methods of Envelope2D return "this" for fluid programming
val envp = new Envelope2D(....) envp.move(dx,dy).scale(0.3).reaspect(ax,ay).centerAt(cx,cy)
@climbage @randallwhitman Yes/no?
I don't have a strong opinion either way.
I like chaining and use it in C++. However, in Java the method signature does not tell what the method does - creates a new object or returns this. So I am more in favor of leaving it as is.
No strong opinion from me either.
When using Scala, can achieve the sample desired syntax via implicits to complement existing library.
I highly advocate to return this rather than void