Added List.toArrayList function in FunctionFactory

This commit is contained in:
2023-01-17 03:03:27 +08:00
parent 6b2b538047
commit 587c718d0a

View File

@@ -175,6 +175,12 @@ inline fun <reified T : Serializable> Intent.getSerializableExtraCompat(key: Str
else getSerializableExtra(key) as? T?
}
/**
* [List]<[T]> 转换为 [ArrayList]<[T]>
* @return [ArrayList]<[T]>
*/
fun <T> List<T>.toArrayList() = toMutableList() as ArrayList<T>
/**
* 计算与当前时间戳相差的友好时间
* @param now 刚刚