Example usage for java.util Map isEmpty

List of usage examples for java.util Map isEmpty

Introduction

In this page you can find the example usage for java.util Map isEmpty.

Prototype

boolean isEmpty();

Source Link

Document

Returns true if this map contains no key-value mappings.

Usage

From source file:Main.java

public static String getChartsType(Map<String, Long> map) {
    String TITLE = "";
    if (map.isEmpty()) {
        return null;
    }/*from   w ww  . j a  v a  2  s  .  com*/
    Set<String> keySet = map.keySet();
    for (String title : keySet) {
        TITLE += title + ",";
    }
    TITLE = TITLE.substring(0, TITLE.length() - 1);
    return TITLE;
}

From source file:Main.java

public static boolean isEmpty(Map map)
/*  63:    */ {/*from  ww  w. j av  a2s.  co  m*/
    /*  64:136 */return (map == null) || (map.isEmpty());
    /*  65:    */}

From source file:Main.java

public static boolean isEmpty(Map metadata) {
    return metadata == null || metadata.isEmpty();
}

From source file:Main.java

public static String getChartsType1(Map<String, Long> map) {
    String DATA = "";
    if (map.isEmpty()) {
        return null;
    }//from  www.  j a  v a  2  s . c o m
    Set<String> keySet = map.keySet();
    for (String title : keySet) {
        Long long1 = map.get(title);
        DATA += "{value:" + long1 + ",name:'" + title + "'},";
    }
    DATA = DATA.substring(0, DATA.length() - 1);
    return "[" + DATA + "]";
}

From source file:Main.java

public static boolean isEmpty(Map<?, ?> map) {
    return map == null || map.isEmpty();
}

From source file:Main.java

public static boolean isEmpty(Map<?, ?> paramMap) {
    if ((paramMap == null) || (paramMap.isEmpty()))
        ;//from w  ww. j ava2s.c  o m
    for (boolean bool = true;; bool = false)
        return bool;
}

From source file:Main.java

public static boolean isNotEmpty(Map<?, ?> test) {
    return test != null && !test.isEmpty();
}

From source file:Main.java

public static boolean isNotEmpty(Map<?, ?> map) {
    return !(map == null || map.isEmpty());
}

From source file:Main.java

/**
 * Return {@code true} if the supplied Map is {@code null}
 * or empty. Otherwise, return {@code false}.
 * @param map the Map to check/*from ww  w.j ava  2s. c om*/
 * @return whether the given Map is empty
 */
@SuppressWarnings("rawtypes")
public static boolean isEmpty(Map map) {
    return (map == null || map.isEmpty());
}

From source file:Main.java

public static final boolean isEmpty() {
    Map<Object, Object> cache = LOCAL_CACHE.get();
    return cache == null || cache.isEmpty();
}