If input is null, then an empty map is returned.
480024
public static <K, V> Map<K, V> parse(@Nullable String input, Converter<K> keyConverter, Converter<V> valueConverter) {
    Map<K, V> map = new LinkedHashMap<>();
    if (input != null) {
      FieldParser reader = new FieldParser(input);
      boolean end = false;
      while (!end) {
        String key = reader.nextKey();
        if (key == null) {
          end = true;
        } else {
          String val = StringUtils.defaultString(reader.nextVal(), "");
          map.put(keyConverter.parse(key), valueConverter.parse(val));
        }
      }
    }
    return map;
  }
1045192
public static <K /*>>> extends @NonNull Object*/, V /*>>> extends @NonNull Object*/>
      void checkMapElementNotNull(Map<K, V> map, @javax.annotation.Nullable Object errorMessage) {
    for (Map.Entry<K, V> entry : map.entrySet()) {
      if (entry.getKey() == null || entry.getValue() == null) {
        throw new NullPointerException(String.valueOf(errorMessage));
      }
    }
  }
885047
protected String nullIfEmpty(String str) {
        return (str == null || str.trim().length() == 0) ? null : str;
    }
725359
public <T extends Map<?, ?>> T notEmpty(final T map, final String message) {
        if (map == null) {
            failNull(message);
        }
        if (map.isEmpty()) {
            fail(message);
        }
        return map;
    }
79857
def lazy_map(initial={}, pre_size=0):
    '''
    
    '''
    if is_lazy_map(initial): return initial
    if not initial: return _EMPTY_LMAP
    return _lazy_turbo_mapping(initial, pre_size)
969632
@SuppressWarnings("rawtypes")
	public static boolean isEmpty(Object obj) {
		if(null == obj) {
			return true;
		}
		
		if(obj instanceof CharSequence) {
			return StrUtil.isEmpty((CharSequence)obj);
		}else if(obj instanceof Map) {
			return MapUtil.isEmpty((Map)obj);
		}else if(obj instanceof Iterable) {
			return IterUtil.isEmpty((Iterable)obj);
		}else if(obj instanceof Iterator) {
			return IterUtil.isEmpty((Iterator)obj);
		}else if(ArrayUtil.isArray(obj)) {
			return ArrayUtil.isEmpty(obj);
		}
		
		return false;
	}
190549
public static <K, V> Map<K, V> notEmpty(Map<K, V> map) throws IllegalArgumentException {
		return notEmpty(map, "[Assertion failed] - this map must not be empty; it must contain at least one entry");
	}
1244978
@Override
    public Object map(Object input) {
        String orig = input.toString();
        if (map.containsKey(orig)) {
            return map.get(orig);
        }

        if (input instanceof String)
            return input;
        else
            return orig;
    }
184856
static String firstNonEmptyValue(String key, Map<?, ?>... maps) {
    for (Map<?, ?> map : maps) {
      String value = (String) map.get(key);
      if (!isEmpty(value)) {
        return value;
      }
    }
    return null;
  }
139462
@Nullable
    public String toJson(@Nullable Map<String, Object> map) {
        if (map == null || map.isEmpty()) {
            return null;
        }

        try (StringWriter writer = new StringWriter(bufferSize)) {
            objectMapper.writeValue(writer, map);
            if (doesAppendLineSeparator) {
                writer.append(CoreConstants.LINE_SEPARATOR);
            }
            return writer.toString();
        } catch (IOException e) {
            throw new IllegalArgumentException("Unable to format map as a JSON", e);
        }
    }
364447
@Override
    public Object map(Object input) {
        Number n = (Number) input;
        if (inputSchema.getMetaData(columnNumber).isValid(new IntWritable(n.intValue()))) {
            return input;
        } else {
            return value;
        }
    }
796769
def to_map_with_default(value, default_value):
        
        result = RecursiveMapConverter.to_nullable_map(value)
        return result if result != None else default_value
1206133
def to_map_with_default(value, default_value):
        
        result = MapConverter.to_nullable_map(value)
        return result if result != None else default_value
484706
public static <K, E, V extends Set<E>> Set<E> getOrEmptySet(final Map<K, V> map, final Object key) {
        if (N.isNullOrEmpty(map)) {
            return N.<E> emptySet();
        }

        final V val = map.get(key);

        if (val != null || map.containsKey(key)) {
            return val;
        } else {
            return N.emptySet();
        }
    }
1342682
@Override
    public Object map(Object input) {
        String value = input.toString().replaceAll("\\s", "");
        return value;
    }
7582
def empty_tree(input_list):
    """"""
    for item in input_list:
        if not isinstance(item, list) or not empty_tree(item):
            return False
    return True
1088511
public static boolean isEmpty(Object value) {
		return (null == value || (value instanceof String && StrUtil.isEmpty((String) value)));
	}