object Name{ def unapply(str:String)={ val pos = str.indexOf(" ") if(pos == -1)None else Some(str.substring(0,pos),str.substring(pos+1)) }} 样板类具有apply和unpply方法 ......
本文摘自 :https://www.cnblogs.com/
海量资源,尽在掌握
object Name{ def unapply(str:String)={ val pos = str.indexOf(" ") if(pos == -1)None else Some(str.substring(0,pos),str.substring(pos+1)) }} 样板类具有apply和unpply方法 ......
本文摘自 :https://www.cnblogs.com/
开通会员,享受整站包年服务