80,351
社区成员
发帖
与我相关
我的任务
分享
public static <T extends Collection<?>> boolean isNormalData(
Context context, T data) {
if (data == null) {
DUIUtil.ToastText(context,
context.getString(R.string.tip_data_null));
return false;
} else if (data.isEmpty()) {
DUIUtil.ToastText(context,
context.getString(R.string.tip_data_empty));
return false;
}
return true;
}
public static <T extends Map<?, ?>> boolean isNormalMapData(
Context context, T data) {
if (data == null) {
DUIUtil.ToastText(context,
context.getString(R.string.tip_data_null));
return false;
} else if (data.isEmpty()) {
DUIUtil.ToastText(context,
context.getString(R.string.tip_data_empty));
return false;
}
return true;
}