Ignore:
Timestamp:
2014-04-26T17:39:23+02:00 (10 years ago)
Author:
Don-vip
Message:

see #8465 - use diamond operator where applicable

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/tools/Utils.java

    r7004 r7005  
    122122
    123123    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);
    125125    }
    126126
     
    142142     */
    143143    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>() {
    145145            @Override
    146146            public boolean evaluate(S o) {
     
    523523     */
    524524    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<>();
    526526        for (T key : dependencies.keySet()) {
    527527            deps.putVoid(key);
     
    533533
    534534        int size = deps.size();
    535         List<T> sorted = new ArrayList<T>();
     535        List<T> sorted = new ArrayList<>();
    536536        for (int i=0; i<size; ++i) {
    537537            T parentless = null;
     
    906906    public static List<String> getMatches(final Matcher m) {
    907907        if (m.matches()) {
    908             List<String> result = new ArrayList<String>(m.groupCount() + 1);
     908            List<String> result = new ArrayList<>(m.groupCount() + 1);
    909909            for (int i = 0; i <= m.groupCount(); i++) {
    910910                result.add(m.group(i));
Note: See TracChangeset for help on using the changeset viewer.