Ignore:
Timestamp:
2011-02-08T11:54:02+01:00 (14 years ago)
Author:
bastiK
Message:

mappaint styles configuration: If the selection of default styles changes in future releases, add the new entries to the user-configured list. Remember the known URLs, so an item that was deleted explicitly is not added again.

File:
1 edited

Legend:

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

    r3865 r3869  
    3939        }
    4040        return null;
     41    }
     42
     43    public static <T> int indexOf(Iterable<? extends T> collection, Predicate<? super T> predicate) {
     44        int i = 0;
     45        for (T item : collection) {
     46            if (predicate.evaluate(item))
     47                return i;
     48            i++;
     49        }
     50        return -1;
    4151    }
    4252
Note: See TracChangeset for help on using the changeset viewer.