tuple2.scala
来自「JAVA 语言的函数式编程扩展」· SCALA 代码 · 共 32 行
SCALA
32 行
/* __ *\** ________ ___ / / ___ Scala API **** / __/ __// _ | / / / _ | (c) 2002-2008, LAMP/EPFL **** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ **** /____/\___/_/ |_/____/_/ | | **** |/ **\* */// $Id: Tuple2.scala 14670 2008-04-16 14:47:55Z washburn $// generated by genprod on Wed Apr 16 16:46:04 CEST 2008 (with extra methods)package scala/** Tuple2 is the canonical representation of a @see Product2 * */case class Tuple2[+T1, +T2](_1:T1, _2:T2) extends Product2[T1, T2] { override def toString() = { val sb = new StringBuilder sb.append('(').append(_1).append(',').append(_2).append(')') sb.toString } /** Swap the elements of the tuple */ def swap: Tuple2[T2,T1] = Tuple2(_2, _1)}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?