scala.collection.jcl
trait Collection

[source: `scala/collection/jcl/Collection.scala`]

`` `trait` Collection[A]
  `extends` MutableIterable[A]

  Analogous to a Java collection.

Author
  Sean McDirmid

Direct Known Subclasses:
  Buffer, Collection.Projection, CollectionWrapper, Set

Method Summary
`def` | + (t : A) : Collection[A] adds "a" from the collection. Useful for chaining.
`def` | ++ (that : Iterable[A]) : Collection[A] 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[A] returns a projection 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, --, -, retainOnly, retainAll, size0, clear

Methods inherited from Collection
size (abstract), toArray, toString, stringPrefix

Methods inherited from Iterable
concat, ++, map, flatMap, filter, partition, takeWhile, dropWhile, take, drop, foreach, forall, exists, find, findIndexOf, indexOf, foldLeft, foldRight, /:, :\, reduceLeft, reduceRight, copyToBuffer, sameElements, toList, toStream, mkString, 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

Method Details

`` `def` hasAll(i : Iterable[A]) : Boolean

  Type-safe version of containsAll. * * @author Sean McDirmid

`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` ++(that : Iterable[A]) : Collection[A]

  Operator shortcut for addAll.

`` `def` -=(a : A) : Unit

  removes "a" from the collection.

`` `def` +=(t : A) : Unit

  adds "a" from the collection.

`` `def` +(t : A) : Collection[A]

  adds "a" from the collection. Useful for chaining.

`abstract` `def` transform(f : (A) => A) : Boolean

  Transforms each element of the collection in-place according to `f`.

Parameters
  `f -`
Returns
  `true` if the collection is actually updated.

`override` `def` projection : Projection[A]

  returns a projection that can be used to call non-strict `filter`, `map`, and `flatMap` methods that build projections of the collection.

Overrides
  MutableIterable.projection