Merge "Revert "Open up AndroidPackage as @SystemApi""
This commit is contained in:
@@ -891,18 +891,4 @@ public class ArrayUtils {
|
||||
public static @Nullable <T> T firstOrNull(T[] items) {
|
||||
return items.length > 0 ? items[0] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a {@link List} from an array. Different from {@link Arrays#asList(Object[])} as that
|
||||
* will use the parameter as the backing array, meaning changes are not isolated.
|
||||
*/
|
||||
public static <T> List<T> toList(T[] array) {
|
||||
List<T> list = new ArrayList<>(array.length);
|
||||
//noinspection ManualArrayToCollectionCopy
|
||||
for (T item : array) {
|
||||
//noinspection UseBulkOperation
|
||||
list.add(item);
|
||||
}
|
||||
return list;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -226,13 +226,6 @@ public class CollectionUtils {
|
||||
return size(cur) == 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns whether the given map {@link Map#isEmpty is empty} or {@code null}
|
||||
*/
|
||||
public static boolean isEmpty(@Nullable Map<?, ?> cur) {
|
||||
return size(cur) == 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the elements of the given list that are of type {@code c}
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user