apache commons util 几个常用类

一: BeanUtils
1 克隆对象
Person a = BeanUtils.cloneBean(Personb);
2 Map 转 对象
BeanUtils.populate(person,map); 
3 对象转Map
Map map = BeanUtils.describe(person) 
4 对象转化
BeanUtils.copyProperties(Object dest, Object orig)

二:lang 包下
1 日期转换类:
DateFormatUtils

2 数字类工具类
NumberUtils(将字符串转换成BIGDECIMAL等)

3 字符串处理工具类
StringUtils

 

posted @ 2015-01-06 17:34  roscee  阅读(532)  评论(0编辑  收藏  举报