1 package org.apache.slide.projector.value; 2 3 import java.util.HashMap ; 4 import java.util.Map ; 5 6 public class MapValue implements Value { 7 private Map map; 8 9 public final static String CONTENT_TYPE = "application/x-java-map"; 10 11 public MapValue() { 12 map = new HashMap (); 13 } 14 15 public MapValue(Map map) { 16 this.map = map; 17 } 18 19 public MapValue(String key, Value value) { 20 this(); 21 addEntry(key, value); 22 } 23 24 public void addEntry(String key, Value value) { 25 map.put(key, value); 26 } 27 28 public Map getMap() { 29 return map; 30 } 31 32 public String getContentType() { 33 return CONTENT_TYPE; 34 } 35 36 } | Popular Tags |