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

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].

主站蜘蛛池模板: 桐庐县| 牟定县| 临猗县| 霍山县| 达孜县| 彭泽县| 阿坝| 德兴市| 宁强县| 河间市| 兴文县| 来凤县| 广河县| 饶阳县| 静安区| 马鞍山市| 克拉玛依市| 延川县| 嘉鱼县| 高邑县| 乌海市| 文登市| 慈利县| 弥渡县| 仲巴县| 探索| 潼南县| 吉隆县| 娄底市| 安阳县| 锡林浩特市| 丹东市| 榆中县| 清水县| 元阳县| 浏阳市| 廊坊市| 津市市| 海淀区| 岳阳县| 萨嘎县|