1、取得key的list
2、包含
3、随机 取整
def ddd = ['aa':11,'bb':22,'cc':33]
def ccc = ddd.keySet()
print ccc
// [aa, bb, cc]
2、包含
def ddd = ['a','b','e','d']
print ddd.contains('sa')
print " "
print ddd.contains('a')
print " "
print 'ab' in ddd
print " "
print 'a' in ddd
print " "
// false true false true
3、随机 取整
// 随机出 0~5的整数,int为取整操作
(int)(Math.random()*6)
// 四舍五入
def ddd = 0.63
print Math.round(ddd)+" # "
print ((int)(ddd+0.5))
// 1 # 1