diff options
Diffstat (limited to 'src/library/scala/runtime/BoxedBooleanArray.scala')
-rw-r--r-- | src/library/scala/runtime/BoxedBooleanArray.scala | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/src/library/scala/runtime/BoxedBooleanArray.scala b/src/library/scala/runtime/BoxedBooleanArray.scala new file mode 100644 index 0000000000..27b4af2643 --- /dev/null +++ b/src/library/scala/runtime/BoxedBooleanArray.scala @@ -0,0 +1,33 @@ +/* __ *\ +** ________ ___ / / ___ Scala API ** +** / __/ __// _ | / / / _ | (c) 2002-2005, LAMP/EPFL ** +** __\ \/ /__/ __ |/ /__/ __ | ** +** /____/\___/_/ |_/____/_/ | | ** +** |/ ** +\* */ + +// $Id$ + +package scala.runtime; + +[serializable] +final class BoxedBooleanArray(val value: Array[Boolean]) extends BoxedArray { + + def length: Int = value.length; + + def apply(index: Int): Object = BoxedBoolean.box(value(index)); + + def update(index: Int, elem: Object): Unit = { + value(index) = elem.asInstanceOf[BoxedBoolean].value + } + + def unbox(elemTag: String): Object = value; + + override def equals(other: Any) = ( + value == other || + other.isInstanceOf[BoxedBooleanArray] && value == other.asInstanceOf[BoxedBooleanArray].value + ); + + override def hashCode(): Int = value.hashCode(); +} + |