Scala Library
|
|
scala/Collection.scala
]
trait
Collection[+A]
extends
Iterable[A]Iterable
used to describe
collections with a finite number of elements.
Basically, this trait just adds size and toString to Iterable,
as most of the methods in Iterable already assume finite-ness.Method Summary | |
abstract def
|
size
: Int
Returns the number of elements in this collection.
|
protected def
|
stringPrefix
: java.lang.String
Defines the prefix of this object's
toString representation. |
def
|
toArray
[B >: A] : Array[B]
Converts this iterable to a fresh Array with elements.
|
override def
|
toString
: java.lang.String
Returns a string representation of the object.
|
Methods inherited from Iterable | |
elements (abstract), concat, ++, map, flatMap, filter, partition, takeWhile, dropWhile, take, drop, foreach, forall, exists, find, findIndexOf, indexOf, foldLeft, foldRight, /:, :\, reduceLeft, reduceRight, copyToBuffer, sameElements, toList, toSeq, toStream, mkString, mkString, mkString, addString, addString, addString, copyToArray, isEmpty, projection, hasDefiniteSize |
Methods inherited from AnyRef | |
getClass, hashCode, equals, clone, notify, notifyAll, wait, wait, wait, finalize, ==, !=, eq, ne, synchronized |
Methods inherited from Any | |
==, !=, isInstanceOf, asInstanceOf |
Method Details |
abstract
def
size : Int
override
def
toString : java.lang.String
The default representation is platform dependent.
protected
def
stringPrefix : java.lang.String
toString
representation.
Scala Library
|
|