no Point2D.setLocation(x,y)?
Sam Howman
s.howman.4580 at gmail.com
Wed Jul 29 23:33:36 UTC 2015
Hi,
I'm wondering why there such a method or even setX/setY. I understand that
some classes prevent such manipulation of their initial values although it
seems like moving a point would be a very common thing to want to do. The
alternative would be to create a new Point2D whenever you would have
otherwise used "setLocation" (or similiar). This would probably be ok but
when there are say 100K points or more the impact on memory is significant.
So is there a good reason why they can not be changed once created? And if
this really is the intention should x and y be declared as "final"?
Regards,
Sam.
More information about the openjfx-dev
mailing list