Ignore:
Timestamp:
2021-09-11T17:50:57+02:00 (5 years ago)
Author:
Don-vip
Message:

global use of Utils.isEmpty/isBlank

File:
1 edited

Legend:

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

    r18207 r18208  
    709709
    710710    /**
     711     * Determines if a multimap is null or empty.
     712     * @param map map
     713     * @return {@code true} if map is null or empty
     714     * @since 18208
     715     */
     716    public static boolean isEmpty(MultiMap<?, ?> map) {
     717        return map == null || map.isEmpty();
     718    }
     719
     720    /**
    711721     * Determines if a string is null or empty.
    712722     * @param string string
     
    716726    public static boolean isEmpty(String string) {
    717727        return string == null || string.isEmpty();
     728    }
     729
     730    /**
     731     * Determines if a string is null or blank.
     732     * @param string string
     733     * @return {@code true} if string is null or blank
     734     * @since 18208
     735     */
     736    public static boolean isBlank(String string) {
     737        return string == null || strip(string).isEmpty();
    718738    }
    719739
Note: See TracChangeset for help on using the changeset viewer.