summaryrefslogtreecommitdiff
path: root/src/library/scala/runtime/RichBoolean.scala
blob: 297ee305e1e8c7770238deede5f191232291b7c0 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
/*                     __                                               *\
**     ________ ___   / /  ___     Scala API                            **
**    / __/ __// _ | / /  / _ |    (c) 2002-2010, LAMP/EPFL             **
**  __\ \/ /__/ __ |/ /__/ __ |                                         **
** /____/\___/_/ |_/____/_/ | |                                         **
**                          |/                                          **
\*                                                                      */

// $Id$


package scala.runtime


final class RichBoolean(x: Boolean) extends Proxy with Ordered[Boolean] {

  // Proxy.self
  def self: Any = x

  // Ordered[Boolean].compare
  def compare (y: Boolean): Int = if (x == y) 0 else if (x) 1 else -1

}