Convenience method for creating an appropriately typed pair. @param a the first object in the Pair @param b the second object in the pair @return a Pair that is templatized with the types of a and b
(A a, B b)
| 79 | * @return a Pair that is templatized with the types of a and b |
| 80 | */ |
| 81 | @NonNull |
| 82 | @SuppressWarnings("UnknownNullness") // Generic nullness should come from type annotations. |
| 83 | public static <A, B> Pair<A, B> create(A a, B b) { |
| 84 | return new Pair<>(a, b); |
| 85 | } |
| 86 | } |
no outgoing calls