scala.collection.mutable

class JavaMapAdaptor

[source: scala/collection/mutable/JavaMapAdaptor.scala]

class JavaMapAdaptor[A, B](jmap : Map)
extends Map[A, B]
This class can be used as an adaptor to create mutable maps from Java classes that implementat the java.util.Map interface.
Author
Matthias Zenger
Version
1.0, 21/07/2003
Method Summary
def -= (key : A) : Unit
Remove a key from this map, noop if key is not present.
override def apply (key : A) : B
Retrieve the value which is associated with the given key. This method throws an exception if there is no mapping from the given key to a value.
override def clear : Unit
Removes all mappings from the map. After this operation is completed, the map is empty.
override def clone : Map[A, B]
Return a clone of this map.
override def contains (key : A) : Boolean
Is the given key mapped to a value by this map?
def elements : Iterator[(A, B)]
Creates a new iterator over all elements contained in this object.
def get (key : A) : Option[B]
Check if this map maps key to a value and return the value if it exists.
override def isDefinedAt (key : A) : Boolean
Does this map contain a mapping from the given key to a value?
override def isEmpty : Boolean
Is this an empty map?
override def keys : Iterator[A]
Creates an iterator for all keys.
def size : Int
Compute the number of key-to-value mappings.
def update (key : A, value : B) : Unit
This method allows one to add a new mapping from key to value to the map. If the map already contains a mapping for key, it will be overridden by this function.
override def values : Iterator[B]
Creates an iterator for a contained values.
Methods inherited from Map
+=, +=, ++=, ++=, +, +, ++, ++, -=, --=, --=, -, -, --, --, getOrElseUpdate, transform, retain, <<, +=, incl, excl
Methods inherited from Map
getOrElse, keySet, equals, hashCode, toString, default, projection, filterKeys, mapElements
Methods inherited from Collection
toArray, 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, toStream, mkString, mkString, mkString, addString, addString, copyToArray, hasDefiniteSize
Methods inherited from PartialFunction
orElse, andThen
Methods inherited from Function1
compose
Methods inherited from AnyRef
getClass, notify, notifyAll, wait, wait, wait, finalize, ==, !=, eq, ne, synchronized
Methods inherited from Any
==, !=, isInstanceOf, asInstanceOf