I want to store key-value pairs like < 4.1, 29..35 >
which I can do with a HashMap<Double, Range<Int>>
:
val womanMap: HashMap<Double, Range<Int>> = hashMapOf()
@RequiresApi(Build.VERSION_CODES.LOLLIPOP)
fun createMap() {
//This both requires API 21
val range = Range(29,35)
womanMap[4.6] = Range.create(29,35)
}
How can I do this below API level 21?