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.Projection, MutableSeq, Ranged

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

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

def retainOnly(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[A]
returns a projection 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]
The default implementation of a map over mutable iterable collections.