Mutable 4 dimensonal tuple in java -
is there java implementation mutable 4 dimensional tuple?
mutabletuple4<intger, integer, double, double> a; a.setfirst(a.getfirst() + 1);
there is, it's vector math, , java3d in particular:
http://docs.oracle.com/cd/e17802_01/j2se/javase/technologies/desktop/java3d/fordevelopers/j3dapi/javax/vecmath/tuple4d.html
not intended general purpose tupling. , doesn't allow mix integers , doubles illustration shows.
like jb nizet says in comment, classes more appropriate.
java tuples mutable
No comments:
Post a Comment