# encoding: utf-8 m = $objectWrappers.wrap($maps.mutableMapOf()) numbers = $objectWrappers.wrap($arrays.arrayOf($plugins.loadClass("java.lang.Long"), 1, 2, 3, 4, 5)) # 将数字与其平方关联起来, {1=1, 2=4, 3=9, 4=16, 5=25} numbers.associateTo(m) { |it| $maps.pairOf(it, it * it) }.forEach { |it| $console.log(it) }