This page is no longer maintained — Please continue to the home page at www.scala-lang.org

Where's Collection?

2 replies
Bill Venners
Joined: 2008-12-18,
User offline. Last seen 31 weeks 5 days ago.

Hi,

I have a deprecation message that I should use Iterable instead of
Collection, and I believe it would work fine, but want to just see
that Collection does nothing more than extend Iterable now, or is a
type alias for Iterable. But I can't find it. It isn't mentioned in
the 2.8 Scaladoc and I can't find it in the source. it must be in
there somewhere. Anyone know where it is?

Thanks.

Bill
----
Bill Venners
Artima, Inc.
http://www.artima.com

extempore
Joined: 2008-12-17,
User offline. Last seen 35 weeks 3 days ago.
Re: Where's Collection?

On 4/3/11 9:44 AM, Bill Venners wrote:
> Hi,
>
> I have a deprecation message that I should use Iterable instead of
> Collection, and I believe it would work fine, but want to just see
> that Collection does nothing more than extend Iterable now, or is a
> type alias for Iterable. But I can't find it. It isn't mentioned in
> the 2.8 Scaladoc and I can't find it in the source. it must be in
> there somewhere. Anyone know where it is?

It's in the scala package object.

@deprecated("use Iterable instead") type Collection[+A] = Iterable[A]
@deprecated("use Iterable instead") val Collection = Iterable

Bill Venners
Joined: 2008-12-18,
User offline. Last seen 31 weeks 5 days ago.
Re: Where's Collection?

Hi Paul,

Ah, thanks. I looked in Predef but forgot to look in the package object.

Bill

On Sun, Apr 3, 2011 at 9:51 AM, Paul Phillips wrote:
> On 4/3/11 9:44 AM, Bill Venners wrote:
>>
>> Hi,
>>
>> I have a deprecation message that I should use Iterable instead of
>> Collection, and I believe it would work fine, but want to just see
>> that Collection does nothing more than extend Iterable now, or is a
>> type alias for Iterable. But I can't find it. It isn't mentioned in
>> the 2.8 Scaladoc and I can't find it in the source. it must be in
>> there somewhere. Anyone know where it is?
>
> It's in the scala package object.
>
>  @deprecated("use Iterable instead") type Collection[+A] = Iterable[A]
>  @deprecated("use Iterable instead") val Collection = Iterable
>

Copyright © 2012 École Polytechnique Fédérale de Lausanne (EPFL), Lausanne, Switzerland