title: Scala extend Map (or HashMap) and allow a constructor list of mappings
body: <p>I have a special Map that will eventually do some consistency checking of values, which are restricted to have special meaning. For now I just want to create a Schema that acts exactly like a Map[String, Any], in particular I'd like to instantiate is with a list of mappings, and not force the types for the Map to be specified, so they are always [String, Any]. So instead of</p>
  
  <pre><code>val myMap:Map[String,Any] = Map("one" -&gt; 1, "two" -&gt; "2", ...)
  </code></pre>
  
  <p>I'd like to be able to have:</p>
  
  <pre><code>val mySchema:Schema = Schema("one" -&gt; 1, "two" -&gt; "2", ...)
  </code></pre>
  
  <p>Map is a trait so I think I need to extend a class like HashMap</p>
  
  <pre><code>class Schema extends HashMap[String, Any]
  </code></pre>
  
  <p>when I instantiate it with a list of initial mappings I get </p>
  
  <pre><code>val mySchema = new Schema("one" -&gt; 1, "two" -&gt; "2", ...)
  
  Error:(110, 19) too many arguments for constructor Schema: ()drivers.Schema
    val mySchema = new Schema("one" -&gt; 1, "two" -&gt; "2")
                ^
  </code></pre>
  
  <p>There is some magic inside HashMap that is far beyond me to read (it <code>extends</code> 1 class <code>with</code> 5 traits). But it looks like the constructor's "contents" (a list of mappings?) are passed to something's <code>initWithContents(contents)</code> pseudo constructor. Do I need something like that there? </p>