|
Scala Library Documentation
|
|
scala/collection/jcl/Collection.scala]
trait
Collection[A]
extends MutableIterable[A]| Method Summary | |
def
|
+
(t : A) : Collection
adds "a" from the collection. Useful for chaining.
|
def
|
++
(that : Iterable[A]) : Collection
Operator shortcut for addAll.
|
def
|
+=
(t : A) : Unit
adds "a" from the collection.
|
def
|
-=
(a : A) : Unit
removes "a" from the collection.
|
abstract def
|
add
(a : A) : Boolean
Adds "a" to the collection, return true if "a" is actually added.
|
def
|
addAll
(i : Iterable[A]) : Boolean
Adds all elements in "i" to the collection, return true if any elements are added.
|
def
|
hasAll
(i : Iterable[A]) : Boolean
Type-safe version of containsAll.
*
* @author Sean McDirmid
|
override def
|
projection
: Projection
returns a facade that can be used to call non-strict
filter,
map, and flatMap methods that build projections
of the collection. |
abstract def
|
transform
(f : (A) => A) : Boolean
Transforms each element of the collection in-place according to
f. |
| Methods inherited from MutableIterable | |
| elements (abstract), has, remove, removeAll, --, -, retain, retainAll, size0, clear |
| Methods inherited from Collection | |
| size (abstract), toArray, toString, stringPrefix |
| Methods inherited from Iterable | |
| concat, ++, map, flatMap, filter, takeWhile, dropWhile, take, drop, foreach, forall, exists, find, findIndexOf, indexOf, foldLeft, foldRight, /:, :\, reduceLeft, reduceRight, copyToBuffer, sameElements, toList, mkString, mkString, addString, addString, copyToArray, isEmpty, hasDefiniteSize |
| Methods inherited from AnyRef | |
| getClass, hashCode, equals, clone, notify, notifyAll, wait, wait, wait, finalize, ==, !=, eq, ne, synchronized |
| Methods inherited from Any | |
| ==, !=, isInstanceOf, asInstanceOf |
| Class Summary | |
class
|
Filter
(p : (A) => Boolean) extends Collection[A]
Base implementation of a filtered collection
|
trait
|
Projection
extends Projection
|
| Method Details |
def
++(that : Iterable[A]) : Collection
def
+(t : A) : Collection
f.f - true if the collection is actually updated.override
def
projection : Projection
filter,
map, and flatMap methods that build projections
of the collection.|
Scala Library Documentation
|
|