Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 405 lines (355 sloc) 13.533 kB
f683124 @odersky *** empty log message ***
odersky authored
1 /* __ *\
2 ** ________ ___ / / ___ Scala API **
18aff4c Updated copyright notices to 2009
Antonio Cunei authored
3 ** / __/ __// _ | / / / _ | (c) 2002-2009, LAMP/EPFL **
3d4d7ce added Array.deepToString, cleaned up MatchError
michelou authored
4 ** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ **
f683124 @odersky *** empty log message ***
odersky authored
5 ** /____/\___/_/ |_/____/_/ | | **
6 ** |/ **
7 \* */
8
9 // $Id$
10
257a184 Refactored portability support
mihaylov authored
11
5a8391b cleaned up code in library/scala/**/*.scala
michelou authored
12 package scala
91a9821 Rearranged header and updated copyright message
mihaylov authored
13
14a631a @odersky massive new collections checkin.
odersky authored
14 import scala.collection.generic._
15 import scala.collection.mutable.{Vector, ArrayBuffer}
257a184 Refactored portability support
mihaylov authored
16 import compat.Platform.arraycopy
17
0196b0e @odersky (1) added readLong to Console.
odersky authored
18 /** This object contains utility methods operating on arrays.
5a8391b cleaned up code in library/scala/**/*.scala
michelou authored
19 *
20 * @author Martin Odersky
21 * @version 1.0
22 */
14a631a @odersky massive new collections checkin.
odersky authored
23 object Array extends SequenceFactory[Array] {
24
8155f5e Modernized DRMacIver's languishing array patch ...
Paul Phillips authored
25 import runtime.BoxedArray;
26 import scala.runtime.ScalaRunTime.boxArray;
14a631a @odersky massive new collections checkin.
odersky authored
27
28 type Coll = Array[_]
29 implicit def builderFactory[A]: BuilderFactory[A, Array[A], Coll] = new BuilderFactory[A, Array[A], Coll] { def apply(from: Coll) = newBuilder[A] }
30 def newBuilder[A]: Builder[A, Array[A], Any] = new ArrayBuffer[A].mapResult(_.toArray)
31
8155f5e Modernized DRMacIver's languishing array patch ...
Paul Phillips authored
32 private def slowcopy(
33 src : AnyRef,
34 srcPos : Int,
35 dest : AnyRef,
36 destPos : Int,
37 length : Int) {
38
39 val srcArray = boxArray(src).asInstanceOf[BoxedArray[AnyRef]]
40 val destArray = boxArray(dest).asInstanceOf[BoxedArray[AnyRef]]
41
42 var i = 0;
43 while(i < length) {
44 destArray(destPos + i) = srcArray(srcPos + i)
45 i += 1
46 }
47 }
5459db1 @odersky 1.
odersky authored
48
5a8391b cleaned up code in library/scala/**/*.scala
michelou authored
49 /** Copy one array to another.
50 * Equivalent to
51 * <code>System.arraycopy(src, srcPos, dest, destPos, length)</code>,
52 * except that this works also for polymorphic and boxed arrays.
53 *
54 * @param src ...
55 * @param srcPos ...
56 * @param dest ...
57 * @param destPos ...
58 * @param length ...
5459db1 @odersky 1.
odersky authored
59 */
6651578 fixed #713
michelou authored
60 def copy(src: AnyRef, srcPos: Int, dest: AnyRef, destPos: Int, length: Int) {
8155f5e Modernized DRMacIver's languishing array patch ...
Paul Phillips authored
61 val srcClass = src.getClass
62 if (srcClass.isArray && dest.getClass.isAssignableFrom(srcClass))
63 arraycopy(src, srcPos, dest, destPos, length)
64 else
65 slowcopy(src, srcPos, dest, destPos, length)
ec25a32 @odersky
odersky authored
66 }
083f4dd @odersky fix arrays some more.
odersky authored
67
6651578 fixed #713
michelou authored
68 /** Concatenate all argument sequences into a single array.
5a8391b cleaned up code in library/scala/**/*.scala
michelou authored
69 *
6651578 fixed #713
michelou authored
70 * @param xs the given argument sequences
71 * @return the array created from the concatenated arguments
5459db1 @odersky 1.
odersky authored
72 */
6651578 fixed #713
michelou authored
73 def concat[T](xs: Seq[T]*): Array[T] = {
083f4dd @odersky fix arrays some more.
odersky authored
74 var len = 0
a87d9a2 updated for-comprehension syntax
michelou authored
75 for (x <- xs) len += x.length
083f4dd @odersky fix arrays some more.
odersky authored
76 val result = new Array[T](len)
77 var start = 0
a87d9a2 updated for-comprehension syntax
michelou authored
78 for (x <- xs) {
6651578 fixed #713
michelou authored
79 copy(x.toArray, 0, result, start, x.length)
06e9460 corrected code example in Scala comment
michelou authored
80 start += x.length
083f4dd @odersky fix arrays some more.
odersky authored
81 }
82 result
83 }
5459db1 @odersky 1.
odersky authored
84
14a631a @odersky massive new collections checkin.
odersky authored
85 /** Returns array of length 0 */
86 override def empty[A]: Array[A] = new Array[A](0)
d4c7abb Moved Predef.Array* to scala.Array.apply*
mihaylov authored
87
14a631a @odersky massive new collections checkin.
odersky authored
88 /** Create an array with given elements.
d4c7abb Moved Predef.Array* to scala.Array.apply*
mihaylov authored
89 *
90 * @param xs the elements to put in the array
91 * @return the array containing elements xs.
92 */
14a631a @odersky massive new collections checkin.
odersky authored
93 override def apply[A](xs: A*): Array[A] = {
d4c7abb Moved Predef.Array* to scala.Array.apply*
mihaylov authored
94 val array = new Array[A](xs.length)
95 var i = 0
a87d9a2 updated for-comprehension syntax
michelou authored
96 for (x <- xs.elements) { array(i) = x; i += 1 }
d4c7abb Moved Predef.Array* to scala.Array.apply*
mihaylov authored
97 array
98 }
99
100 def apply(xs: Boolean*): Array[Boolean] = {
101 val array = new Array[Boolean](xs.length)
102 var i = 0
a87d9a2 updated for-comprehension syntax
michelou authored
103 for (x <- xs.elements) { array(i) = x; i += 1 }
d4c7abb Moved Predef.Array* to scala.Array.apply*
mihaylov authored
104 array
105 }
6651578 fixed #713
michelou authored
106
d4c7abb Moved Predef.Array* to scala.Array.apply*
mihaylov authored
107 def apply(xs: Byte*): Array[Byte] = {
108 val array = new Array[Byte](xs.length)
109 var i = 0
a87d9a2 updated for-comprehension syntax
michelou authored
110 for (x <- xs.elements) { array(i) = x; i += 1 }
d4c7abb Moved Predef.Array* to scala.Array.apply*
mihaylov authored
111 array
112 }
6651578 fixed #713
michelou authored
113
d4c7abb Moved Predef.Array* to scala.Array.apply*
mihaylov authored
114 def apply(xs: Short*): Array[Short] = {
115 val array = new Array[Short](xs.length)
116 var i = 0
a87d9a2 updated for-comprehension syntax
michelou authored
117 for (x <- xs.elements) { array(i) = x; i += 1 }
d4c7abb Moved Predef.Array* to scala.Array.apply*
mihaylov authored
118 array
119 }
6651578 fixed #713
michelou authored
120
d4c7abb Moved Predef.Array* to scala.Array.apply*
mihaylov authored
121 def apply(xs: Char*): Array[Char] = {
122 val array = new Array[Char](xs.length)
123 var i = 0
a87d9a2 updated for-comprehension syntax
michelou authored
124 for (x <- xs.elements) { array(i) = x; i += 1 }
d4c7abb Moved Predef.Array* to scala.Array.apply*
mihaylov authored
125 array
126 }
6651578 fixed #713
michelou authored
127
d4c7abb Moved Predef.Array* to scala.Array.apply*
mihaylov authored
128 def apply(xs: Int*): Array[Int] = {
129 val array = new Array[Int](xs.length)
130 var i = 0
a87d9a2 updated for-comprehension syntax
michelou authored
131 for (x <- xs.elements) { array(i) = x; i += 1 }
d4c7abb Moved Predef.Array* to scala.Array.apply*
mihaylov authored
132 array
133 }
6651578 fixed #713
michelou authored
134
d4c7abb Moved Predef.Array* to scala.Array.apply*
mihaylov authored
135 def apply(xs: Long*): Array[Long] = {
136 val array = new Array[Long](xs.length)
137 var i = 0
a87d9a2 updated for-comprehension syntax
michelou authored
138 for (x <- xs.elements) { array(i) = x; i += 1 }
d4c7abb Moved Predef.Array* to scala.Array.apply*
mihaylov authored
139 array
140 }
6651578 fixed #713
michelou authored
141
d4c7abb Moved Predef.Array* to scala.Array.apply*
mihaylov authored
142 def apply(xs: Float*): Array[Float] = {
143 val array = new Array[Float](xs.length)
144 var i = 0
a87d9a2 updated for-comprehension syntax
michelou authored
145 for (x <- xs.elements) { array(i) = x; i += 1 }
d4c7abb Moved Predef.Array* to scala.Array.apply*
mihaylov authored
146 array
147 }
6651578 fixed #713
michelou authored
148
d4c7abb Moved Predef.Array* to scala.Array.apply*
mihaylov authored
149 def apply(xs: Double*): Array[Double] = {
150 val array = new Array[Double](xs.length)
151 var i = 0
a87d9a2 updated for-comprehension syntax
michelou authored
152 for (x <- xs.elements) { array(i) = x; i += 1 }
d4c7abb Moved Predef.Array* to scala.Array.apply*
mihaylov authored
153 array
154 }
6651578 fixed #713
michelou authored
155
d4c7abb Moved Predef.Array* to scala.Array.apply*
mihaylov authored
156 def apply(xs: Unit*): Array[Unit] = {
157 val array = new Array[Unit](xs.length)
158 var i = 0
a87d9a2 updated for-comprehension syntax
michelou authored
159 for (x <- xs.elements) { array(i) = x; i += 1 }
d4c7abb Moved Predef.Array* to scala.Array.apply*
mihaylov authored
160 array
161 }
162
14a631a @odersky massive new collections checkin.
odersky authored
163 /** Create array with given dimensions */
164 def ofDim[A](n1: Int): Array[A] =
165 new Array[A](n1)
166 def ofDim[A](n1: Int, n2: Int): Array[Array[A]] =
167 tabulate(n1)(_ => ofDim[A](n2))
168 def ofDim[A](n1: Int, n2: Int, n3: Int): Array[Array[Array[A]]] =
169 tabulate(n1)(_ => ofDim[A](n2, n3))
170 def ofDim[A](n1: Int, n2: Int, n3: Int, n4: Int): Array[Array[Array[Array[A]]]] =
171 tabulate(n1)(_ => ofDim[A](n2, n3, n4))
172 def ofDim[A](n1: Int, n2: Int, n3: Int, n4: Int, n5: Int): Array[Array[Array[Array[Array[A]]]]] =
173 tabulate(n1)(_ => ofDim[A](n2, n3, n4, n5))
174
175 /** Create array with given dimensions
176 * @deprecated use ofDim instead */
177 @deprecated def withDims[A](n1: Int): Array[A] = ofDim(n1)
178 @deprecated def withDims[A](n1: Int, n2: Int): Array[Array[A]] = ofDim(n1, n2)
179 @deprecated def withDims[A](n1: Int, n2: Int, n3: Int): Array[Array[Array[A]]] = ofDim(n1, n2, n3)
180 @deprecated def withDims[A](n1: Int, n2: Int, n3: Int, n4: Int): Array[Array[Array[Array[A]]]] = ofDim(n1, n2, n3, n4)
181 @deprecated def withDims[A](n1: Int, n2: Int, n3: Int, n4: Int, n5: Int): Array[Array[Array[Array[Array[A]]]]] = ofDim(n1, n2, n3, n4, n5)
182
d169735 @odersky fixed bugs 900,892, contrib 296.
odersky authored
183 /** Create an array containing several copies of an element.
184 *
185 * @param n the length of the resulting array
186 * @param elem the element composing the resulting array
187 * @return an array composed of n elements all equal to elem
14a631a @odersky massive new collections checkin.
odersky authored
188 * @deprecated use `Array.fill` instead.
d169735 @odersky fixed bugs 900,892, contrib 296.
odersky authored
189 */
14a631a @odersky massive new collections checkin.
odersky authored
190 @deprecated def make[A](n: Int, elem: A): Array[A] = {
6e961f3 Fixed a problem with previous commit
mihaylov authored
191 val a = new Array[A](n)
d169735 @odersky fixed bugs 900,892, contrib 296.
odersky authored
192 var i = 0
193 while (i < n) {
194 a(i) = elem
06e9460 corrected code example in Scala comment
michelou authored
195 i += 1
d169735 @odersky fixed bugs 900,892, contrib 296.
odersky authored
196 }
197 a
198 }
199
e744a80 @odersky fixed #768 for HashSet.
odersky authored
200 /** Create an array containing the values of a given function <code>f</code>
201 * over given range <code>[0..n)</code>
14a631a @odersky massive new collections checkin.
odersky authored
202 * @deprecated use `Array.tabulate` instead.
e744a80 @odersky fixed #768 for HashSet.
odersky authored
203 */
14a631a @odersky massive new collections checkin.
odersky authored
204 @deprecated def fromFunction[A](f: Int => A)(n: Int): Array[A] = {
e744a80 @odersky fixed #768 for HashSet.
odersky authored
205 val a = new Array[A](n)
206 var i = 0
207 while (i < n) {
208 a(i) = f(i)
209 i += 1
210 }
211 a
212 }
213
214 /** Create an array containing the values of a given function <code>f</code>
215 * over given range <code>[0..n1, 0..n2)</code>
14a631a @odersky massive new collections checkin.
odersky authored
216 * @deprecated use `Array.tabulate` instead.
e744a80 @odersky fixed #768 for HashSet.
odersky authored
217 */
14a631a @odersky massive new collections checkin.
odersky authored
218 @deprecated def fromFunction[A](f: (Int, Int) => A)(n1: Int, n2: Int): Array[Array[A]] =
e744a80 @odersky fixed #768 for HashSet.
odersky authored
219 fromFunction(i => fromFunction(f(i, _))(n2))(n1)
220
221 /** Create an array containing the values of a given function <code>f</code>
222 * over given range <code>[0..n1, 0..n2, 0..n3)</code>
14a631a @odersky massive new collections checkin.
odersky authored
223 * @deprecated use `Array.tabulate` instead.
e744a80 @odersky fixed #768 for HashSet.
odersky authored
224 */
14a631a @odersky massive new collections checkin.
odersky authored
225 @deprecated def fromFunction[A](f: (Int, Int, Int) => A)(n1: Int, n2: Int, n3: Int): Array[Array[Array[A]]] =
e744a80 @odersky fixed #768 for HashSet.
odersky authored
226 fromFunction(i => fromFunction(f(i, _, _))(n2, n3))(n1)
227
228 /** Create an array containing the values of a given function <code>f</code>
229 * over given range <code>[0..n1, 0..n2, 0..n3, 0..n4)</code>
14a631a @odersky massive new collections checkin.
odersky authored
230 * @deprecated use `Array.tabulate` instead.
e744a80 @odersky fixed #768 for HashSet.
odersky authored
231 */
14a631a @odersky massive new collections checkin.
odersky authored
232 @deprecated def fromFunction[A](f: (Int, Int, Int, Int) => A)(n1: Int, n2: Int, n3: Int, n4: Int): Array[Array[Array[Array[A]]]] =
e744a80 @odersky fixed #768 for HashSet.
odersky authored
233 fromFunction(i => fromFunction(f(i, _, _, _))(n2, n3, n4))(n1)
234
235 /** Create an array containing the values of a given function <code>f</code>
236 * over given range <code>[0..n1, 0..n2, 0..n3, 0..n4, 0..n5)</code>
14a631a @odersky massive new collections checkin.
odersky authored
237 * @deprecated use `Array.tabulate` instead.
e744a80 @odersky fixed #768 for HashSet.
odersky authored
238 */
14a631a @odersky massive new collections checkin.
odersky authored
239 @deprecated def fromFunction[A](f: (Int, Int, Int, Int, Int) => A)(n1: Int, n2: Int, n3: Int, n4: Int, n5: Int): Array[Array[Array[Array[Array[A]]]]] =
e744a80 @odersky fixed #768 for HashSet.
odersky authored
240 fromFunction(i => fromFunction(f(i, _, _, _, _))(n2, n3, n4, n5))(n1)
ec25a32 @odersky
odersky authored
241 }
242
0196b0e @odersky (1) added readLong to Console.
odersky authored
243 /** This class represents polymorphic arrays. <code>Array[T]</code> is Scala's representation
244 * for Java's <code>T[]</code>.
5a8391b cleaned up code in library/scala/**/*.scala
michelou authored
245 *
246 * @author Martin Odersky
247 * @version 1.0
248 */
14a631a @odersky massive new collections checkin.
odersky authored
249 final class Array[A](_length: Int) extends Vector[A] with VectorTemplate[A, Array[A]] {
250
251 override protected[this] def newBuilder: Builder[A, Array[A], Any] = throw new Error()
a961d3d @odersky 1.
odersky authored
252
14a631a @odersky massive new collections checkin.
odersky authored
253 /** Multidimensional array creation
254 * @deprecated use Array.ofDim instead
255 */
256 @deprecated def this(dim1: Int, dim2: Int) = {
6651578 fixed #713
michelou authored
257 this(dim1)
11f1b34 @dragos Added multidimensional arrays (up to 9 dimensio...
dragos authored
258 throw new Error()
259 }
260
14a631a @odersky massive new collections checkin.
odersky authored
261 /** Multidimensional array creation
262 * @deprecated use Array.ofDim instead */
263 @deprecated def this(dim1: Int, dim2: Int, dim3: Int) = {
6651578 fixed #713
michelou authored
264 this(dim1)
11f1b34 @dragos Added multidimensional arrays (up to 9 dimensio...
dragos authored
265 throw new Error()
266 }
267
14a631a @odersky massive new collections checkin.
odersky authored
268 /** Multidimensional array creation
269 * @deprecated use Array.ofDim instead */
270 @deprecated def this(dim1: Int, dim2: Int, dim3: Int, dim4: Int) = {
6651578 fixed #713
michelou authored
271 this(dim1)
11f1b34 @dragos Added multidimensional arrays (up to 9 dimensio...
dragos authored
272 throw new Error()
273 }
274
14a631a @odersky massive new collections checkin.
odersky authored
275 /** Multidimensional array creation
276 * @deprecated use Array.ofDim instead */
277 @deprecated def this(dim1: Int, dim2: Int, dim3: Int, dim4: Int, dim5: Int) = {
11f1b34 @dragos Added multidimensional arrays (up to 9 dimensio...
dragos authored
278 this(dim1);
279 throw new Error()
280 }
281
14a631a @odersky massive new collections checkin.
odersky authored
282 /** Multidimensional array creation
283 * @deprecated use Array.ofDim instead */
284 @deprecated def this(dim1: Int, dim2: Int, dim3: Int, dim4: Int, dim5: Int, dim6: Int) = {
6651578 fixed #713
michelou authored
285 this(dim1)
11f1b34 @dragos Added multidimensional arrays (up to 9 dimensio...
dragos authored
286 throw new Error()
287 }
288
14a631a @odersky massive new collections checkin.
odersky authored
289 /** Multidimensional array creation
290 * @deprecated use Array.ofDim instead */
291 @deprecated def this(dim1: Int, dim2: Int, dim3: Int, dim4: Int, dim5: Int, dim6: Int, dim7: Int) = {
6651578 fixed #713
michelou authored
292 this(dim1)
11f1b34 @dragos Added multidimensional arrays (up to 9 dimensio...
dragos authored
293 throw new Error()
294 }
295
14a631a @odersky massive new collections checkin.
odersky authored
296 /** Multidimensional array creation
297 * @deprecated use Array.ofDim instead */
298 @deprecated def this(dim1: Int, dim2: Int, dim3: Int, dim4: Int, dim5: Int, dim6: Int, dim7: Int, dim8: Int) = {
6651578 fixed #713
michelou authored
299 this(dim1)
11f1b34 @dragos Added multidimensional arrays (up to 9 dimensio...
dragos authored
300 throw new Error()
301 }
302
14a631a @odersky massive new collections checkin.
odersky authored
303 /** Multidimensional array creation
304 * @deprecated use Array.ofDim instead */
305 @deprecated def this(dim1: Int, dim2: Int, dim3: Int, dim4: Int, dim5: Int, dim6: Int, dim7: Int, dim8: Int, dim9: Int) = {
6651578 fixed #713
michelou authored
306 this(dim1)
11f1b34 @dragos Added multidimensional arrays (up to 9 dimensio...
dragos authored
307 throw new Error()
308 }
309
a961d3d @odersky 1.
odersky authored
310 /** The length of the array */
5a8391b cleaned up code in library/scala/**/*.scala
michelou authored
311 def length: Int = throw new Error()
a961d3d @odersky 1.
odersky authored
312
313 /** The element at given index.
3d4d7ce added Array.deepToString, cleaned up MatchError
michelou authored
314 * <p>
315 * Indices start a <code>0</code>; <code>xs.apply(0)</code> is the first
316 * element of array <code>xs</code>.
317 * </p>
318 * <p>
319 * Note the indexing syntax <code>xs(i)</code> is a shorthand for
320 * <code>xs.apply(i)</code>.
321 * </p>
322 *
a961d3d @odersky 1.
odersky authored
323 * @param i the index
324 * @throws ArrayIndexOutOfBoundsException if <code>i < 0</code> or
325 * <code>length <= i</code>
326 */
d4c7abb Moved Predef.Array* to scala.Array.apply*
mihaylov authored
327 def apply(i: Int): A = throw new Error()
a961d3d @odersky 1.
odersky authored
328
06e9460 corrected code example in Scala comment
michelou authored
329 /** <p>
330 * Update the element at given index.
331 * </p>
332 * <p>
333 * Indices start a <code>0</code>; <code>xs.apply(0)</code> is the first
334 * element of array <code>xs</code>.
335 * </p>
336 * <p>
337 * Note the indexing syntax <code>xs(i) = x</code> is a shorthand
338 * for <code>xs.update(i, x)</code>.
339 * </p>
3d4d7ce added Array.deepToString, cleaned up MatchError
michelou authored
340 *
a961d3d @odersky 1.
odersky authored
341 * @param i the index
342 * @param x the value to be written at index <code>i</code>
343 * @throws ArrayIndexOutOfBoundsException if <code>i < 0</code> or
344 * <code>length <= i</code>
345 */
6651578 fixed #713
michelou authored
346 override def update(i: Int, x: A) { throw new Error() }
a961d3d @odersky 1.
odersky authored
347
3d4d7ce added Array.deepToString, cleaned up MatchError
michelou authored
348 /**
080802c @odersky 1.
odersky authored
349 * @return a deep string representation of this array.
3d4d7ce added Array.deepToString, cleaned up MatchError
michelou authored
350 */
351 def deepToString(): String = throw new Error()
352
06e9460 corrected code example in Scala comment
michelou authored
353 /** <p>
354 * Returns a string representation of this array object. The resulting string
355 * begins with the string <code>start</code> and is finished by the string
356 * <code>end</code>. Inside, the string representations of elements (w.r.t.
357 * the method <code>deepToString()</code>) are separated by the string
358 * <code>sep</code>. For example:
359 * </p>
360 * <p>
361 * <code>Array(Array(1, 2), Array(3)).deepMkString("[", "; ", "]") = "[[1; 2]; [3]]"</code>
362 * </p>
3d4d7ce added Array.deepToString, cleaned up MatchError
michelou authored
363 *
364 * @param start starting string.
365 * @param sep separator string.
366 * @param end ending string.
367 * @return a string representation of this array object.
368 */
369 def deepMkString(start: String, sep: String, end: String): String =
370 throw new Error()
371
372 /** Returns a string representation of this array object. The string
373 * representations of elements (w.r.t. the method <code>deepToString()</code>)
374 * are separated by the string <code>sep</code>.
375 *
376 * @param sep separator string.
377 * @return a string representation of this array object.
378 */
379 def deepMkString(sep: String): String = throw new Error()
380
9715d09 added Array.deepEquals, improved external links...
michelou authored
381 /** <p>
382 * Returns <code>true</code> if the two specified arrays are
383 * <em>deeply equal</em> to one another.
384 * </p>
385 * <p>
386 * Two array references are considered deeply equal if both are null,
387 * or if they refer to arrays that contain the same number of elements
388 * and all corresponding pairs of elements in the two arrays are deeply
389 * equal.
390 * </p>
391 * <p>
392 * See also method <code>deepEquals</code> in the Java class
393 * <a href="http://java.sun.com/javase/6/docs/api/java/util/Arrays.html"
394 * target="_top">java.utils.Arrays</a>
395 * </p>
396 *
397 * @param that the second
398 * @return <code>true</code> iff both arrays are deeply equal.
399 */
400 def deepEquals(that: Any): Boolean = throw new Error()
9d12fe1 * Added Array.Projection to facilitate efficien...
Sean McDirmid authored
401
14a631a @odersky massive new collections checkin.
odersky authored
402 /** @deprecated use slice instead */
403 @deprecated def subArray(from: Int, end: Int): Array[A] = throw new Error()
f683124 @odersky *** empty log message ***
odersky authored
404 }
Something went wrong with that request. Please try again.