Changeset 9542 in josm
- Timestamp:
- 2016-01-19T23:59:54+01:00 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/tools/Pair.java
r9371 r9542 47 47 } 48 48 49 /** 50 * Converts a single-typed pair to a list. 51 * @param <T> type of both elements 52 * @param p pair 53 * @return list containing a and b 54 */ 49 55 public static <T> List<T> toList(Pair<T, T> p) { 50 56 List<T> l = new ArrayList<>(2); … … 54 60 } 55 61 62 /** 63 * Sorts a single-typed pair so {@code a <= b}. 64 * @param <T> type of both elements 65 * @param p pair 66 * @return {@code p} 67 */ 56 68 public static <T> Pair<T, T> sort(Pair<T, T> p) { 57 69 if (p.b.hashCode() < p.a.hashCode()) {
Note:
See TracChangeset
for help on using the changeset viewer.