1 9 package org.jboss.portal.common.command.result; 10 11 import java.util.HashMap ; 12 import java.util.Map ; 13 14 18 public class SimpleResult 19 implements Result 20 { 21 22 private ResultType type; 23 private Map values; 24 25 public SimpleResult(ResultType type) 26 { 27 this.type = type; 28 this.values = null; 29 } 30 31 public void put(String key, Object value) 32 { 33 if (values == null) 34 { 35 values = new HashMap (); 36 } 37 values.put(key, value); 38 } 39 40 public Object get(String key) 41 { 42 return values != null ? values.get(key) : null; 43 } 44 45 public ResultType getType() 46 { 47 return type; 48 } 49 } 50 | Popular Tags |