al validatorMap: scala.collection.mutable.HashMap[Int, Array[String]] = scala.collection.mutable.HashMap()
val validators = Array("min", "max", "othervalidator")
validatorMap.put(0, validators)
validatorMap.foreach(kv => {
println("field: " + kv._1 + " num validators:" + kv._2.length )
})
output
validatorMap: scala.collection.mutable.HashMap[Int,Array[String]] = Map()
validators: Array[String] = Array(min, max, othervalidator)
res0: Option[Array[String]] = None
field: 0 num validators:3
val validators = Array("min", "max", "othervalidator")
validatorMap.put(0, validators)
validatorMap.foreach(kv => {
println("field: " + kv._1 + " num validators:" + kv._2.length )
})
output
validatorMap: scala.collection.mutable.HashMap[Int,Array[String]] = Map()
validators: Array[String] = Array(min, max, othervalidator)
res0: Option[Array[String]] = None
field: 0 num validators:3
No comments:
Post a Comment