-
Notifications
You must be signed in to change notification settings - Fork 47
Open
Description
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.
Metadata
Metadata
Assignees
Labels
No labels