Do you mean something like this?
scala> val m = collection.immutable.HashMap(0 -> 1, 2 -> 3)
m: scala.collection.immutable.HashMap[Int,Int] = Map((0,1), (2,3))
scala> m.get(0)
res0: Option[Int] = Some(1)
scala> m.get(2)
res1: Option[Int] = Some(3)
scala> m.get(1)
res2: Option[Int] = None