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

move isKeyTrue/isKeyFalse from AbstractPrimitive to Tagged

Location:
trunk/src/org/openstreetmap/josm/data/osm
Files:
2 edited

Legend:

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

    r13668 r13804  
    650650
    651651    /**
    652      * Returns true if the {@code key} corresponds to an OSM true value.
    653      * @param key OSM key
    654      * @return {@code true} if the {@code key} corresponds to an OSM true value
    655      * @see OsmUtils#isTrue(String)
    656      */
    657     public final boolean isKeyTrue(String key) {
    658         return OsmUtils.isTrue(get(key));
    659     }
    660 
    661     /**
    662      * Returns true if the {@code key} corresponds to an OSM false value.
    663      * @param key OSM key
    664      * @return {@code true} if the {@code key} corresponds to an OSM false value
    665      * @see OsmUtils#isFalse(String)
    666      */
    667     public final boolean isKeyFalse(String key) {
    668         return OsmUtils.isFalse(get(key));
    669     }
    670 
    671     /**
    672652     * Gets a key ignoring the case of the key
    673653     * @param key The key to get
  • 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.