fix some lint warnings, use kotlin view imports in ModalTimeLineActivity

This commit is contained in:
Conny Duck 2018-07-23 15:18:33 +02:00
commit 67f4479e86
7 changed files with 10 additions and 28 deletions

View file

@ -27,19 +27,9 @@ public class ListUtils {
return list == null || list.isEmpty();
}
/** @return 0 if list is null, or else return list.size() */
public static int getSize(@Nullable List list) {
if (list == null) {
return 0;
} else {
return list.size();
}
}
/** @return a new ArrayList containing the elements without duplicates in the same order */
public static <T> ArrayList<T> removeDuplicates(List<T> list) {
LinkedHashSet<T> set = new LinkedHashSet<>();
set.addAll(list);
LinkedHashSet<T> set = new LinkedHashSet<>(list);
return new ArrayList<>(set);
}
}