Last active
April 28, 2021 08:56
-
-
Save rommansabbir/38ffbdda9ce1758cb004f3d7a2e95372 to your computer and use it in GitHub Desktop.
Simply check if two list is the exact same or not.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fun <T> MutableList<out T>.contentDeepEquals( | |
other: MutableList<out T> | |
): Boolean { | |
return Gson().toJson(this).toString() == Gson().toJson(other).toString() | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Handy little extension, I have some thing similar for objects as well 😅