scala.collection.jcl

trait MutableIterable

[source: scala/collection/jcl/MutableIterable.scala]

trait MutableIterable[A]
extends Collection[A]
An iterable collection that supports remove operations. Useful for representing projections of mutable collections that where only the remove operation makes sense.
Author
Sean McDirmid
Direct Known Subclasses:
Collection, IterableWrapper, Map, MutableIterable.Map, MutableSeq, Ranged

Method Summary
def - (t : A) : MutableIterable
def -- (that : Iterable[A]) : MutableIterable
Operator shortcut for removeAll.
def clear : Unit
clear all elements from the collection.
override abstract def elements : MutableIterator[A]
Creates a new iterator over all elements contained in this object.
def has (t : A) : Boolean
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.
def remove (t : A) : Boolean
def removeAll (that : Iterable[A]) : Boolean
def retain (p : (A) => Boolean) : Unit
retain only elements in the collection that predicate p is true for.
def retainAll (that : Iterable[A]) : Boolean
retain only elements that are also in that.
protected def size0 : Int
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
protected class Map [B](f : (A) => B) extends MutableIterable[B]
The default implementation of a map over mutable iterable collections.
trait Projection extends Projection
Method Details
def has(t : A) : Boolean
Returns
true if t is in the collection.

def remove(t : A) : Boolean
Returns
true if t was removed from this collection.

def removeAll(that : Iterable[A]) : Boolean
Returns
true if any element in that was removed from this collection.

def --(that : Iterable[A]) : MutableIterable
Operator shortcut for removeAll.

def -(t : A) : MutableIterable
Returns
the collection that t was removed from.

def retain(p : (A) => Boolean) : Unit
retain only elements in the collection that predicate p is true for.

def retainAll(that : Iterable[A]) : Boolean
retain only elements that are also in that.

protected def size0 : Int
Returns
the current number of elements in the collection.

def clear : Unit
clear all elements from the collection.

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.

override abstract def elements : MutableIterator[A]
Creates a new iterator over all elements contained in this object.
Returns
the new iterator