Advertisement
Guest User

Untitled

a guest
Sep 12th, 2019
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Kotlin 0.33 KB | None | 0 0
  1.                     val sorted = set.sortedWith(compareBy<GraphItem>
  2.                     { it::class.java.simpleName }.reversed().thenBy {
  3.                         when (it) {
  4.                             is GraphItem.Node -> it
  5.                             is GraphItem.Edge -> it
  6.                         }
  7.                     })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement