Github user afs commented on a diff in the pull request: https://github.com/apache/jena/pull/337#discussion_r159238188 --- Diff: jena-base/src/main/java/org/apache/jena/atlas/lib/Pair.java --- @@ -37,6 +40,30 @@ public A car() { return a ; } public B cdr() { return b ; } + public static class OfSameType<T> extends Pair<T, T> { + --- End diff -- A few of thoughts about this class: * it seems to exist for the specialized to the boolean behaviors - maybe the name should reflect that? * maybe it should be a top level class because it is public and static (and not does not relate specially to Pair<>)? * should it be functions taking a `Pair<X,X>` as argument? As a class, it's stateless other than the `Pair<X,X>`-ness even "X extends interface" for the "as boolean" nature?
---