summaryrefslogtreecommitdiff
path: root/src/library/scala/collection/mutable/Buffer.scala
diff options
context:
space:
mode:
authorSean McDirmid <sean.mcdirmid@gmail.com>2007-07-17 15:29:47 +0000
committerSean McDirmid <sean.mcdirmid@gmail.com>2007-07-17 15:29:47 +0000
commitc739e595a326a9288179b270426991ee6c8431cf (patch)
treea8fd7ddaf6c467a6ea64eb16f1966082482cafbb /src/library/scala/collection/mutable/Buffer.scala
parent8da5cd2cf0b9bcf91c119b5a5f741bea3d53d5ab (diff)
downloadscala-c739e595a326a9288179b270426991ee6c8431cf.tar.gz
scala-c739e595a326a9288179b270426991ee6c8431cf.tar.bz2
scala-c739e595a326a9288179b270426991ee6c8431cf.zip
Added rich string builder (a random access sequ...
Added rich string builder (a random access sequence, mutable buffer). Fleshed out compat.StringBuilder some more to support this. Rolled back buffered iterator to its simple "head" method form, added advanced buffer iterator for multi-lookahead peak (call buffered.advanced for advanced version) Made string a random access seq. Deprecated utility fromString methods for strings that no longer make sense (better alternatives in RichString). Also, ensured that many seq operations return strings. Changed deprecated accesses from XML library. Made Stream a sub-class of Seq.Projection rather than a direct subclass of Seq to support the lazy nature of Seq. Deprecated type aliases in Predef, deprecated direct access to Integer through Predef. Added to to Range.
Diffstat (limited to 'src/library/scala/collection/mutable/Buffer.scala')
-rw-r--r--src/library/scala/collection/mutable/Buffer.scala4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/library/scala/collection/mutable/Buffer.scala b/src/library/scala/collection/mutable/Buffer.scala
index 0d8c4539e1..5180bbbe0c 100644
--- a/src/library/scala/collection/mutable/Buffer.scala
+++ b/src/library/scala/collection/mutable/Buffer.scala
@@ -76,6 +76,9 @@ trait Buffer[A] extends AnyRef
i += 1
}
}
+ /** return a read only alias of this buffer
+ */
+ def readOnly : Seq[A]
/** Appends a number of elements provided by an iterable object
* via its <code>elements</code> method. The identity of the
@@ -246,4 +249,5 @@ trait Buffer[A] extends AnyRef
/** Defines the prefix of the string representation.
*/
override protected def stringPrefix: String = "Buffer"
+
}