Changeset 8338 in josm for trunk/src/org/openstreetmap/josm/tools/Pair.java
- Timestamp:
- 2015-05-07T01:27:41+02:00 (11 years ago)
- File:
-
- 1 edited
-
trunk/src/org/openstreetmap/josm/tools/Pair.java (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/tools/Pair.java
r7509 r8338 2 2 package org.openstreetmap.josm.tools; 3 3 import java.util.ArrayList; 4 import java.util.List; 4 5 5 6 /** … … 31 32 } 32 33 33 @Override public int hashCode() { 34 @Override 35 public int hashCode() { 34 36 return a.hashCode() + b.hashCode(); 35 37 } 36 38 37 @Override public boolean equals(Object other) { 39 @Override 40 public boolean equals(Object other) { 38 41 if (other instanceof Pair<?, ?>) { 39 42 Pair<?, ?> o = (Pair<?, ?>)other; … … 43 46 } 44 47 45 public static <T> ArrayList<T> toArrayList(Pair<T, T> p) {46 ArrayList<T> l = new ArrayList<>(2);48 public static <T> List<T> toList(Pair<T, T> p) { 49 List<T> l = new ArrayList<>(2); 47 50 l.add(p.a); 48 51 l.add(p.b);
Note:
See TracChangeset
for help on using the changeset viewer.
