Search This Blog

Java: tuples (pairs, triplets)

public class Pair<X, Y> { 
  public final X x; 
  public final Y y; 
  public Pair(X x, Y y) { 
    this.x = x; 
    this.y = y; 
  } 
}

//    Unit<A> 
//    Pair<A,B> 
//    Triplet<A,B,C> 
//    Quartet<A,B,C,D> 
//    Quintet<A,B,C,D,E> 
//    Sextet<A,B,C,D,E,F> 
//    Septet<A,B,C,D,E,F,G> 
//    Octet<A,B,C,D,E,F,G,H> 
//    Ennead<A,B,C,D,E,F,G,H,I> 
//    Decade<A,B,C,D,E,F,G,H,I,J>  

see also

No comments:

Post a Comment