summaryrefslogtreecommitdiff
path: root/sources
diff options
context:
space:
mode:
Diffstat (limited to 'sources')
-rw-r--r--sources/scala/ListBuffer.scala8
1 files changed, 5 insertions, 3 deletions
diff --git a/sources/scala/ListBuffer.scala b/sources/scala/ListBuffer.scala
index f861df0606..d07fc5c9b4 100644
--- a/sources/scala/ListBuffer.scala
+++ b/sources/scala/ListBuffer.scala
@@ -9,14 +9,16 @@
package scala;
+/** This class is still quite messy, because I wanted to implement
+ * Map. I will soon clean it up and probably remove some of the
+ * functionality. -- Matthias
+ */
class ListBuffer[A] with Seq[A] with PartialFunction[Int, A] {
protected var first: LinkedList[A] = null;
protected var last: LinkedList[A] = null;
protected var len: Int = 0;
- def size: Int = len;
-
def length: Int = len;
def isDefinedAt(n: Int) = (n >= 0) && (n < len);
@@ -113,7 +115,7 @@ class ListBuffer[A] with Seq[A] with PartialFunction[Int, A] {
def prependSeq(iter: Iterable[A]) = prependIterator(iter.elements);
- protected def prependIterator(iter: Iterator[A]): Unit = if (iter.hasNext) {
+ private def prependIterator(iter: Iterator[A]): Unit = if (iter.hasNext) {
val cur = iter.next;
prependIterator(iter);
prepend(cur);