MapHelpler.java 671 B

1234567891011121314151617181920212223242526272829303132
  1. package com.hcks.cmfds.commons.util;
  2. import java.util.HashMap;
  3. /**
  4. * @Author 刘厦(liusha.information@gmail.com)
  5. * @Date 创建时间:May 16, 2011 11:38:45 PM
  6. * @Version 0.0.0
  7. * 类说明: 快速建立命名参数Map
  8. */
  9. public class MapHelpler extends HashMap<String, Object>{
  10. private static final long serialVersionUID = 2795245114015599778L;
  11. private MapHelpler() {
  12. super(5);
  13. }
  14. public MapHelpler put(String key,Object value){
  15. super.put(key, value);
  16. return this;
  17. }
  18. public static MapHelpler build(){
  19. return new MapHelpler();
  20. }
  21. public static MapHelpler build(String key, Object value) {
  22. return new MapHelpler().put(key, value);
  23. }
  24. }