官术网_书友最值得收藏!

AnyRef

The AnyRef class represents all values that are/can be represented as objects in the underlying runtime system. It includes all user-defined classes that explicitly do not inherit from AnyVal. Some standard reference classes are String, Tuple, Function, and Array. The Scala compiler either provides syntactic sugar for them, or generates special code at the time of compilation for their operations. We've already seen a bit of syntactic sugar such as Tuple2, which can be represented as (A, B) where A and B are type parameters. An applied form of this Tuple2 can be (String and Int). In Scala, we represent this as Tuple2[String, Int].

主站蜘蛛池模板: 衢州市| 舟曲县| 静安区| 泽库县| 和政县| 高台县| 娱乐| 乌鲁木齐市| 黑水县| 黎川县| 利川市| 北川| 九龙坡区| 衡南县| 旅游| 蓬莱市| 洛扎县| 色达县| 临西县| 灵璧县| 含山县| 潢川县| 灵山县| 米林县| 车致| 白水县| 横山县| 平江县| 鄱阳县| 金寨县| 临湘市| 额济纳旗| 碌曲县| 双柏县| 丰台区| 海伦市| 铜山县| 阳春市| 永仁县| 台南县| 丰台区|