页面树结构

2017-07-25 Apache Spark 2.2.0 官方文档中文版发布 : http://spark.apachecn.org/docs/cn/2.2.0/


MachineLearning 优酷地址 : http://i.youku.com/apachecn

转至元数据结尾
转至元数据起始

def ::(x: B): List[B]

  •  [use case] Adds an element at the beginning of this list.
  • Example:
    1 :: List(2, 3) = List(2, 3).::(1) = List(1, 2, 3)
  • x
    the element to prepend.
  • returns
    a list which contains x as first element and which continues with this list.

中文解释就是 => 元素 :: 数组,表示在数组的首位添加元素

 

def :::(prefix: List[B]): List[B]

  •  [use case] Adds the elements of a given list in front of this list.
  • Example:
    List(1, 2) ::: List(3, 4) = List(3, 4).:::(List(1, 2)) = List(1, 2, 3, 4)
  • prefix
    The list elements to prepend.
  • returns
    a list resulting from the concatenation of the given list prefix and this list.

中文解释就是 => 数组1 ::: 数组2,表示在 数组2 的 首位 添加 数组1

  • 无标签