Changeset 7005 in josm for trunk/src/org/openstreetmap/josm/tools/Utils.java
- Timestamp:
- 2014-04-26T17:39:23+02:00 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/tools/Utils.java
r7004 r7005 122 122 123 123 public static <T> Collection<T> filter(Collection<? extends T> collection, Predicate<? super T> predicate) { 124 return new FilteredCollection< T>(collection, predicate);124 return new FilteredCollection<>(collection, predicate); 125 125 } 126 126 … … 142 142 */ 143 143 public static <S, T extends S> SubclassFilteredCollection<S, T> filteredCollection(Collection<S> collection, final Class<T> klass) { 144 return new SubclassFilteredCollection< S, T>(collection, new Predicate<S>() {144 return new SubclassFilteredCollection<>(collection, new Predicate<S>() { 145 145 @Override 146 146 public boolean evaluate(S o) { … … 523 523 */ 524 524 public static <T> List<T> topologicalSort(final MultiMap<T,T> dependencies) { 525 MultiMap<T,T> deps = new MultiMap< T,T>();525 MultiMap<T,T> deps = new MultiMap<>(); 526 526 for (T key : dependencies.keySet()) { 527 527 deps.putVoid(key); … … 533 533 534 534 int size = deps.size(); 535 List<T> sorted = new ArrayList< T>();535 List<T> sorted = new ArrayList<>(); 536 536 for (int i=0; i<size; ++i) { 537 537 T parentless = null; … … 906 906 public static List<String> getMatches(final Matcher m) { 907 907 if (m.matches()) { 908 List<String> result = new ArrayList< String>(m.groupCount() + 1);908 List<String> result = new ArrayList<>(m.groupCount() + 1); 909 909 for (int i = 0; i <= m.groupCount(); i++) { 910 910 result.add(m.group(i));
Note:
See TracChangeset
for help on using the changeset viewer.