标签:inf str http com dex index image scala 技术分享
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方法
标签:inf str http com dex index image scala 技术分享
原文地址:https://www.cnblogs.com/liqingan/p/10192219.html