package rivet.core.util;

public class Triple<A, B, C> {
    public final A left;
    public final B center;
    public final C right;
    
    private Triple (A a, B b, C c) { left = a; center = b; right = c; }
    
    public static <A, B, C> Triple<A, B, C> make (A left, B center, C right) { return new Triple<>(left, center, right); }
}

@@ -19,16 +19,53 @@
 .util;%0A%0A
+import java.util.function.Function;%0A%0A
 public c
@@ -165,20 +165,16 @@
  right;%0A
-    
 %0A    pri
@@ -184,17 +184,16 @@
 e Triple
- 
 (A a, B 
@@ -201,16 +201,24 @@
 , C c) %7B
+%0A       
  left = 
@@ -219,16 +219,24 @@
 eft = a;
+%0A       
  center 
@@ -239,16 +239,24 @@
 ter = b;
+%0A       
  right =
@@ -262,15 +262,576 @@
 = c;
+%0A   
  %7D%0A
+%0A
     
+public final A left() %7B%0A        return left;%0A    %7D%0A%0A    public final B center() %7B%0A        return center;%0A    %7D%0A%0A    public final C right() %7B%0A        return right;%0A    %7D%0A%0A    public %3CR%3E Triple%3CR, B, C%3E mapLeft(Function%3CA, R%3E fun) %7B%0A        return Triple.make(fun.apply(left), center, right);%0A    %7D%0A%0A    public %3CR%3E Triple%3CA, R, C%3E mapCenter(Function%3CB, R%3E fun) %7B%0A        return Triple.make(left, fun.apply(center), right);%0A    %7D%0A%0A    public %3CR%3E Triple%3CA, B, R%3E mapRight(Function%3CC, R%3E fun) %7B%0A        return Triple.make(left, center, fun.apply(right));%0A    %7D%0A
 %0A   
@@ -875,17 +875,16 @@
  C%3E make
- 
 (A left,
@@ -904,16 +904,24 @@
 right) %7B
+%0A       
  return 
@@ -954,13 +954,17 @@
  right);
+%0A   
  %7D%0A%7D%0A

update Triple