From subsecret
Jump to: navigation, search

SubSecret Tuples

Since Java standard libraries does not include tuples, you will often need to either create tuples yourself or find existing libraries. There exist some really well implemented libraries out there, but you usually get more than you need. This is a single class implementation of Tuple1 to Tuple5. Instead of having to include an extra .jar file, simple copy this one class into your project wherever you want. The tuple implementation supports equals() and is Serializable.


String elemOne = "Test";
int elemTwo = 5;
Tuple2<String, Integer> tuple2 = Tuple2.of(elemOne,elemTwo);


Date Version File Description
29. September 2013 1.00 Initial release


No license. Do whatever you want with it.