package com.conveyal.r5.util;

import javafx.beans.NamedArg;
import javafx.util.Pair;

/**
 * Tuple of two elements with same type
 */
public class P2<E> extends Pair<E,E> {
    /**
     * Creates a new pair
     *
     * @param key   The key for this pair
     * @param value The value to use for this pair
     */
    public P2(
        @NamedArg("key")
        E key,
        @NamedArg("value")
        E value) {
        super(key, value);
    }
}

@@ -151,27 +151,55 @@
 %3CE%3E 
-extends Pair%3CE,E%3E %7B
+%7B%0A    public final E a;%0A%0A    public final E b;%0A
 %0A   
@@ -250,19 +250,17 @@
  @param 
-key
+b
    The k
@@ -290,21 +290,17 @@
  @param 
-value
+b
  The val
@@ -358,110 +358,459 @@
     
-@NamedArg(%22key%22)%0A        E key,%0A        @NamedArg(%22value%22)%0A        E value) %7B%0A        super(key, value
+E a,%0A        E b) %7B%0A        this.a = a;%0A        this.b = b;%0A    %7D%0A%0A    @Override%0A    public String toString() %7B%0A        return String.format(%22P2%3C%25s %25s%3E%22, a, b);%0A    %7D%0A%0A    @Override%0A    public int hashCode() %7B%0A        return (a != null ? a.hashCode() : 0) +%0A                (b != null ? b.hashCode() * 31 : 0);%0A    %7D%0A%0A    @Override%0A    public boolean equals(Object o) %7B%0A        if (a == null %7C%7C b == null) return a == b;%0A        else return a.equals(b
 );%0A 

remove dependency on JavaFX (not supported on Amazon Linux OpenJDK).