src/main/java/org/organicdesign/fp/tuple/Tuple2.java
public static <K,V> Tuple2<K,V> of(Map.Entry<K,V> entry) {
        // Protect against multiple-instantiation
        if (entry instanceof Tuple2) {
            return (Tuple2<K,V>) entry;
        }
        return new Tuple2<>(entry.getKey(), entry.getValue());
    }
public static <K,V> Tuple2<K,V> of(Map.Entry<K,V> entry) {
        // Protect against multiple-instantiation
        if (entry instanceof Tuple2) {
            return (Tuple2<K,V>) entry;
        }
        return new Tuple2<>(entry.getKey(), entry.getValue());
    }
public static < K , V > Tuple2 < K , V > of ( Map . Entry < K , V > entry ) { // Protect against multiple-instantiation if ( entry instanceof Tuple2 ) { return ( Tuple2 < K , V > ) entry ; } return new Tuple2 <> ( entry . getKey ( ) , entry . getValue ( ) ) ; }
Map.Entry factory method
Map . Entry factory method