Created
October 12, 2011 02:37
-
-
Save paulp/1280094 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% scala | |
Welcome to Scala version 2.10.0.r25823-b20111011192940 (Java HotSpot(TM) 64-Bit Server VM, Java 1.6.0_26). | |
Type in expressions to have them evaluated. | |
Type :help for more information. | |
scala> class Bippy extends java.util.Collection[Int] | |
<console>:7: error: class Bippy is missing 13 methods: | |
As seen from class Bippy, the missing method signatures are as follows. | |
(For convenience, these are usable as stub implementations.) | |
def add(x$1: Int): Boolean = ??? | |
def addAll(x$1: java.util.Collection[_ <: Int]): Boolean = ??? | |
def clear(): Unit = ??? | |
def contains(x$1: Any): Boolean = ??? | |
def containsAll(x$1: java.util.Collection[_]): Boolean = ??? | |
def isEmpty(): Boolean = ??? | |
def iterator(): java.util.Iterator[Int] = ??? | |
def remove(x$1: Any): Boolean = ??? | |
def removeAll(x$1: java.util.Collection[_]): Boolean = ??? | |
def retainAll(x$1: java.util.Collection[_]): Boolean = ??? | |
def size(): Int = ??? | |
def toArray(): Array[Object] = ??? | |
def toArray[T](x$1: Array[T with Object]): Array[T with Object] = ??? | |
class Bippy extends java.util.Collection[Int] | |
^ | |
scala> :paste | |
// Entering paste mode (ctrl-D to finish) | |
class Bippy extends java.util.Collection[Int] { | |
def add(x$1: Int): Boolean = ??? | |
def addAll(x$1: java.util.Collection[_ <: Int]): Boolean = ??? | |
def clear(): Unit = ??? | |
def contains(x$1: Any): Boolean = ??? | |
def containsAll(x$1: java.util.Collection[_]): Boolean = ??? | |
def isEmpty(): Boolean = ??? | |
def iterator(): java.util.Iterator[Int] = ??? | |
def remove(x$1: Any): Boolean = ??? | |
def removeAll(x$1: java.util.Collection[_]): Boolean = ??? | |
def retainAll(x$1: java.util.Collection[_]): Boolean = ??? | |
def size(): Int = ??? | |
def toArray(): Array[Object] = ??? | |
def toArray[T](x$1: Array[T with Object]): Array[T with Object] = ??? | |
} | |
// Exiting paste mode, now interpreting. | |
defined class Bippy | |
scala> new Bippy | |
res0: Bippy = Bippy@76e86c03 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment