- 链接地址:https://blog.csdn.net/DearNingning/article/details/117755858
- 链接标题:自定义排序-CSDN博客
- 所属网站:blog.csdn.net
- 被收藏次数:742
文章浏览阅读44次。object Text01 { def main(args: Array[String]): Unit = { val ls=List(new User(1,"WNN",10),new User(2,"CC",11),new User(3,"DD",19)) implicit def opt(user: User): Ordered[User] ={ new Ordered[User] { override def compare(that: User): I
版权声明:本文发布于特牛网址导航 内容均来源于互联网 如有侵权联系删除
标签:自定义排序