I'd like to be able to write methods like this:
public static <T> Tuple<T> average(Tuple<T>... tuples) {
...rather than writing multiple methods to handle the different types of Tuples.
This could be accomplished by declaring a new Tuple class that Tuple3d, Tuple2f, etc. will extend, like so:
public class Tuple<T extends Tuple<T>> {
And in the extending classes:
public class Tuple3f extends Tuple<Tuple3f> {
If you like the idea, I might fork the project and work on it myself.
I'd like to be able to write methods like this:
...rather than writing multiple methods to handle the different types of Tuples.
This could be accomplished by declaring a new Tuple class that Tuple3d, Tuple2f, etc. will extend, like so:
And in the extending classes:
If you like the idea, I might fork the project and work on it myself.