blob: 89b4b519864195cb4f72277954283c6381f4b77f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
package cgeo.geocaching.utils;
import java.util.List;
import java.util.Map;
public class CollectionUtils {
public static <T> boolean isEmpty(List<T> list) {
return (list != null && list.size() == 0);
}
public static <T,T2> boolean isEmpty(Map<T,T2> map) {
return (map != null && map.size() == 0);
}
public static <T> boolean isNotEmpty(List<T> list) {
return (list != null && list.size() != 0);
}
public static <T,T2> boolean isNotEmpty(Map<T,T2> map) {
return (map != null && map.size() != 0);
}
}
|