Ignore:
Timestamp:
2018-05-21T16:45:01+02:00 (6 years ago)
Author:
Don-vip
Message:

move isKeyTrue/isKeyFalse from AbstractPrimitive to Tagged

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/osm/Tagged.java

    r13668 r13804  
    199199     */
    200200    void removeAll();
     201
     202    /**
     203     * Returns true if the {@code key} corresponds to an OSM true value.
     204     * @param key OSM key
     205     * @return {@code true} if the {@code key} corresponds to an OSM true value
     206     * @see OsmUtils#isTrue(String)
     207     */
     208    default boolean isKeyTrue(String key) {
     209        return OsmUtils.isTrue(get(key));
     210    }
     211
     212    /**
     213     * Returns true if the {@code key} corresponds to an OSM false value.
     214     * @param key OSM key
     215     * @return {@code true} if the {@code key} corresponds to an OSM false value
     216     * @see OsmUtils#isFalse(String)
     217     */
     218    default boolean isKeyFalse(String key) {
     219        return OsmUtils.isFalse(get(key));
     220    }
    201221}
Note: See TracChangeset for help on using the changeset viewer.