注冊 | 登錄讀書好,好讀書,讀好書!
讀書網(wǎng)-DuShu.com
當前位置: 首頁出版圖書科學技術計算機/網(wǎng)絡軟件與程序設計其他編程語言/工具快學Scala

快學Scala

快學Scala

定 價:¥79.00

作 者: (美)霍斯曼(Horstmann,C.S.)著高宇翔譯
出版社: 電子工業(yè)出版社
叢編項:
標 簽: 程序設計

ISBN: 9787121185670 出版時間: 2012-09-29 包裝: 平裝
開本: 16開 頁數(shù): 408頁 字數(shù):  

內(nèi)容簡介

  Scala是一門以Java虛擬機(JVM)為目標運行環(huán)境并將面向對象和函數(shù)式編程語言的最佳特性結合在一起的編程語言。你可以使用Scala編寫出更加精簡的程序,同時充分利用并發(fā)的威力。由于Scala運行于JVM之上,因此它可以訪問任何Java類庫并且與Java框架進行互操作。本書從實用角度出發(fā),給出了一份快速的、基于代碼的入門指南。Horstmann以“博客文章大小”的篇幅介紹了Scala的概念,讓你可以快速地掌握和應用。實際上手的操作,清晰定義的能力層次,從初級到專家級,全程指導。本書適合有一定的Java編程經(jīng)驗、對Scala感興趣,并希望盡快掌握Scala核心概念和用法的開發(fā)者閱讀。

作者簡介

  Cay S. Horstmann是《Java核心技術》卷1和卷2第8版(Sun Microsystems出版社2008年出版)的主要作者,除此之外,他還著有其他十多本面向專業(yè)程序員和計算機科學專業(yè)學生的書籍。他是San Jose

圖書目錄

譯者序............................................III序...............................XV前言............................................XVII作者簡介......................................XIX第1章 基礎A1 .............................11.1 Scala解釋器 .....................................11.2 聲明值和變量.................................31.3 常用類型.........................................41.4 算術和操作符重載.............................................51.5 調用函數(shù)和方法..............................71.6 apply方法 ........................................81.7 Scaladoc...........................................9練習.....................................11第2章 控制結構和函數(shù)A1 ............................132.1  條件表達式..................................142.2 語句終止.......................................162.3 塊表達式和賦值...............................................162.4 輸入和輸出 ..................................172.5 循環(huán)...............................................182.6 高級for循環(huán)和for推導式..................................192.7 函數(shù)...............................................212.8 默認參數(shù)和帶名參數(shù) L1..............................222.9 變長參數(shù)L1...............................222.10 過程...............................................232.11 懶值L1.......................................242.12 異常...............................................25練習.....................................27第3章 數(shù)組相關操作A1 ................................293.1 定長數(shù)組.......................................293.2 變長數(shù)組:數(shù)組緩沖.......................................303.3 遍歷數(shù)組和數(shù)組緩沖.......................................313.4 數(shù)組轉換.......................................323.5 常用算法.......................................343.6 解讀Scaladoc.................................353.7 多維數(shù)組.......................................373.8 與Java的互操作 ................................................37練習.....................................38第4章 映射和元組A1 ...................................414.1 構造映射.......................................414.2 獲取映射中的值...............................................424.3 更新映射中的值...............................................434.4 迭代映射.......................................444.5 已排序映射...................................444.6 與Java的互操作 ................................................454.7 元組...............................................454.8 拉鏈操作.......................................46練習.....................................47第5章 類A1 ...............................515.1 簡單類和無參方法...........................................515.2 帶getter和setter的屬性......................................525.3 只帶getter的屬性 ..............................................555.4 對象私有字段................................565.5 Bean屬性L1................................575.6 輔助構造器...................................595.7 主構造器.......................................605.8 嵌套類L1...................................63練習.....................................65第6章 對象A1 ...........................696.1 單例對象.......................................696.2 伴生對象.......................................706.3 擴展類或特質的對象.......................................716.4 apply方法 ......................................726.5 應用程序對象................................736.6 枚舉...............................................74練習.....................................75第7章 包和引入A1 .......................................797.1 包...................................................807.2 作用域規(guī)則...................................817.3 串聯(lián)式包語句................................837.4 文件頂部標記法...............................................837.5 包對象...........................................847.6 包可見性.......................................857.7 引入...............................................857.8 任何地方都可以聲明引入 ..............................867.9 重命名和隱藏方法...........................................877.10 隱式引入.......................................87練習.....................................88第8章 繼承A1 ..........................918.1 擴展類...........................................918.2 重寫方法.......................................928.3 類型檢查和轉換...............................................938.4 受保護字段和方法...........................................948.5 超類的構造...................................948.6 重寫字段.......................................958.7 匿名子類.......................................968.8 抽象類...........................................978.9 抽象字段.......................................978.10 構造順序和提前定義L3...............................988.11 Scala繼承層級..............................1008.12 對象相等性L1.............................................101練習......................................................102第9章 文件和正則表達式A1 .......................1059.1 讀取行.........................................1069.2 讀取字符.....................................1069.3 讀取詞法單元和數(shù)字.....................................1079.4 從URL或其他源讀取 .....................................1089.5 讀取二進制文件.............................................1089.6 寫入文本文件..............................1089.7 訪問目錄.....................................1099.8 序列化.........................................1109.9 進程控制A2 ..............................1119.10 正則表達式.................................1139.11 正則表達式組..............................114練習......................................................114第10章 特質L1 ..........................................11710.1 為什么沒有多重繼承...................................11710.2 當做接口使用的特質...................................11910.3 帶有具體實現(xiàn)的特質...................................12010.4 帶有特質的對象...........................................12110.5 疊加在一起的特質.......................................12210.6 在特質中重寫抽象方法...............................12410.7 當做富接口使用的特質...............................12410.8 特質中的具體字段.......................................12510.9 特質中的抽象字段.......................................12610.10 特質構造順序...............................................12710.11 初始化特質中的字段...................................12910.12 擴展類的特質...............................................13110.13 自身類型L2...............................................13210.14 背后發(fā)生了什么...........................................133練習......................................................135第11章 操作符L1 .......................................13911.1 標識符.......................................13911.2 中置操作符................................14011.3 一元操作符................................14111.4 賦值操作符................................14211.5 優(yōu)先級.......................................14211.6 結合性.......................................14311.7 apply和update方法........................................14411.8 提取器L2................................14511.9 帶單個參數(shù)或無參數(shù)的提取器L2..............................14611.10 unapplySeq方法L2....................................147練習......................................................148第12章 高階函數(shù)L1 ...................................15112.1 作為值的函數(shù)...............................................15112.2 匿名函數(shù)...................................15212.3 帶函數(shù)參數(shù)的函數(shù).......................................15312.4 參數(shù)(類型)推斷.......................................15412.5 一些有用的高階函數(shù)...................................15512.6 閉包...........................................15612.7 SAM轉換...................................15712.8 柯里化.......................................15812.9 控制抽象...................................15912.10 return表達式...............................161練習......................................................162第13章 集合A2 ..........................................16513.1 主要的集合特質...........................................16613.2 可變和不可變集合.......................................16713.3 序列...........................................16813.4 列表...........................................16913.5 可變列表...................................17013.6 集...............................................17113.7 用于添加或去除元素的操作符......................................17313.8 常用方法...................................17513.9 將函數(shù)映射到集合 .......................................17713.10 化簡、折疊和掃描A3...............................17813.11 拉鏈操作...................................18113.12 迭代器.......................................18313.13 流A3.......................................18413.14 懶視圖.......................................18513.15 與Java集合的互操作 ....................................18613.16 線程安全的集合...........................................18813.17 并行集合...................................188練習......................................................190第14章 模式匹配和樣例類A2 .....................19314.1 更好的switch..............................19414.2 守衛(wèi)...........................................19514.3 模式中的變量...............................................19514.4 類型模式...................................19614.5 匹配數(shù)組、列表和元組...............................19714.6 提取器.......................................19814.7 變量聲明中的模式.......................................19914.8 for表達式中的模式 .......................................19914.9 樣例類.......................................20014.10 copy方法和帶名參數(shù)....................................20114.11 case語句中的中置表示法.............................20114.12 匹配嵌套結構...............................................20214.13 樣例類是邪惡的嗎.......................................20314.14 密封類.......................................20414.15 模擬枚舉...................................20514.16 Option類型................................20514.17 偏函數(shù)L2................................207練習......................................................207第15章 注解A2 ..........................................21115.1 什么是注解................................21215.2 什么可以被注解...........................................21215.3 注解參數(shù)...................................21315.4 注解實現(xiàn)...................................21415.5 針對Java特性的注解 ....................................21615.5.1 Java修飾符 ......................................21615.5.2 標記接口.........................................21615.5.3 受檢異常.........................................21715.5.4 變長參數(shù).........................................21715.5.5 JavaBeans........................................21815.6 用于優(yōu)化的注解...........................................21915.6.1 尾遞歸.............................................21915.6.2 跳轉表生成與內(nèi)聯(lián).........................22015.6.3 可省略方法.....................................22115.6.4 基本類型的特殊化.........................22215.7 用于錯誤和警告的注解...............................223練習......................................................224第16章 XML處理
Copyright ? 讀書網(wǎng) m.ranfinancial.com 2005-2020, All Rights Reserved.
鄂ICP備15019699號 鄂公網(wǎng)安備 42010302001612號