📄 richlong.scala
字号:
/* __ *\** ________ ___ / / ___ Scala API **** / __/ __// _ | / / / _ | (c) 2002-2008, LAMP/EPFL **** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ **** /____/\___/_/ |_/____/_/ | | **** |/ **\* */// $Id: RichLong.scala 14416 2008-03-19 01:17:25Z mihaylov $package scala.runtimefinal class RichLong(x: Long) extends Proxy with Ordered[Long] { // Proxy.self def self: Any = x // Ordered[Long].compare def compare(y: Long): Int = if (x < y) -1 else if (x > y) 1 else 0 def min(y: Long): Long = if (x < y) x else y def max(y: Long): Long = if (x > y) x else y def abs: Long = if (x < 0) -x else x def toBinaryString: String = System.Convert.ToString(x, 2) def toHexString: String = System.Convert.ToString(x, 16) def toOctalString: String = System.Convert.ToString(x, 8)}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -