Ignore:
Timestamp:
2014-01-29T21:14:07+01:00 (10 years ago)
Author:
simon04
Message:

fix #8413 - Presets: no not apply use_last_as_default when calling the preset dialog on an object with some tags of this preset already set

This avoids wrongs address tags when using the address preset.

File:
1 edited

Legend:

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

    r6749 r6772  
    6565    public static final Charset UTF_8 = Charset.forName("UTF-8");
    6666
     67    /**
     68     * Tests whether {@code predicate} applies to at least one elements from {@code collection}.
     69     */
    6770    public static <T> boolean exists(Iterable<? extends T> collection, Predicate<? super T> predicate) {
    6871        for (T item : collection) {
     
    7174        }
    7275        return false;
     76    }
     77
     78    /**
     79     * Tests whether {@code predicate} applies to all elements from {@code collection}.
     80     */
     81    public static <T> boolean forAll(Iterable<? extends T> collection, Predicate<? super T> predicate) {
     82        return !exists(collection, Predicates.not(predicate));
    7383    }
    7484
Note: See TracChangeset for help on using the changeset viewer.