How does one represent null in scala for collections?
The equivalent for List's would be "Nil" and it would be represented as follows:
Nil.asInstanceOf[Map[String,String]]
What is the equivalent for Maps?
UPDATE The two working solutions that I am aware of, from experimenting as well as from the suggested solutions are "Map()" and "null.asInstanceOf(Map[String,String])". The Map() is not what I intended: i did not want an empty item but actually a non-existent one (aka null in java). I was already aware that Nil is only for Lists: it was intended to illustrate the flavor of entity I was searching for used by Map's. Using "null.asInstanceOf(..)" is not a scala-ish idiom. It appears there are no equivalents for Map ..?
Nilisn't what you want for lists; it's an empty list, exactly the same asList()andList.empty.Nilandnullas equivalent, but it can't treatNiland an empty list differently (becauseNilis simply an empty list).Nil.