summaryrefslogtreecommitdiff
path: root/src/library/scala/runtime/RichBoolean.scala
blob: 323b828e31faf5300c4c8b0e996f1bc1129d7880 (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-2009, 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

}