fyqt.net
当前位置:首页 >> sCAlA tuplE2 >>

sCAlA tuplE2

没有tuple1 scala> val t2=("test",1) t2: (String, Int) = (test,1) scala> t2.getClass res0: Class[_ val t3=("ok",12,100.0) t3: (String, Int, Double) = (ok,12,100.0) scala> t3.getClass res1: Class[_

def tupleToList(p:Product) = p.productIterator.toListval l1 = tupleToList( (1,2,3,4,5) ).map( _.toString.toInt)

网站首页 | 网站地图
All rights reserved Powered by www.fyqt.net
copyright ©right 2010-2021。
内容来自网络,如有侵犯请联系客服。zhit325@qq.com