王家林親授《DT大數據夢工廠》大數據實戰視頻 Scala 深刻淺出實戰經典(1-64講)完整視頻、PPT、代碼下載:
百度雲盤:http://pan.baidu.com/s/1c0noOt6
騰訊微雲:http://url.cn/TnGbdC
360雲盤:http://yunpan.cn/cQ4c2UALDjSKy 訪問密碼 45e2
土豆:http://www.tudou.com/programs/view/a6qIB7SqOlc/
優酷:http://v.youku.com/v_show/id_XMTI4NzM2NjM0MA==.html?from=s1.8-1-1.2
愛奇藝:http://www.iqiyi.com/w_19rrtik9eh.html#vfrm=2-3-0-1
騰訊視頻: http://v.qq.com/boke/page/c/0/3/c01594nmz73.html
技術愛好者尤爲是大數據愛好者 能夠加DT大數據夢工廠的qq羣html
DT大數據夢工廠① :462923555
DT大數據夢工廠②:437123764
DT大數據夢工廠③ :418110145java
微信公衆帳號: DT_Spark
王家林老師微信號: 18610086859
王家林老師QQ: 1740415547
王家林老師郵箱: 18610086859@126.com微信
本視頻由王家林老師, 親自講解, 徹底經過代碼實戰把您帶人大數據的時代.ide
package com.parllay.scala.type_parameterizitor /** * Created by richard on 15-8-9. * 第54講:Scala中複合類型實戰詳解 */ trait Compound_Type1; trait Compound_Type2; class Compound_Type extends Compound_Type1 with Compound_Type2 object Compound_Type { def compound_Type(x: Compound_Type1 with Compound_Type2) = {println("Compound Type in global method")} def main(args: Array[String]) { /** * new 一個複合類型 */ compound_Type(new Compound_Type with Compound_Type1 with Compound_Type2) /** * 建立一個object */ object Compound_Type_Object extends Compound_Type1 with Compound_Type2 compound_Type(Compound_Type_Object) /** * 利用type申明別名 */ type compound_Type_Alias = Compound_Type1 with Compound_Type2 def compound_Type_Local(x: compound_Type_Alias) = println("Compound Type in local method") /** * */ val compound_Type_Class = new Compound_Type compound_Type_Local(compound_Type_Class) /** * 複合類型中也能夠包含結構類型 */ type Scala = Compound_Type1 with Compound_Type2 {def init(): Unit} } } /** * class A extends B with C with D with E 應作相似以下形式解讀: class A extends (B with C with D with E) T1 with T2 with T3 … 這種形式的類型稱爲複合類型(compound type)或者也叫交集類型(intersection type)。 跟結構類型相似,能夠在一個方法裏聲明類型參數時使用複合類型: scala> trait X1; trait X2; scala> def test(x: X1 with X2) = {println("ok")} test: (x: X1 with X2)Unit scala> test(new X1 with X2) ok scala> object A extends X1 with X2 scala> test(A) ok 也能夠經過 type 聲明: scala> type X = X1 with X2 defined type alias X scala> def test(x:X) = println("OK") test: (x: X)Unit scala> class A extends X1 with X2 scala> val a = new A scala> test(a) OK 在上一篇介紹結構類型時也提到過複合類型中也可包含結構類型: scala> type X = X1 with X2 { def close():Unit } defined type alias X */