1 4 5 9 10 package org.openlaszlo.utils; 11 import java.util.*; 12 13 18 public class VersionMap { 19 20 Map mMap = new HashMap(); 21 22 25 public void put(Object version, Object key, Object value) { 26 Map m = (Map)mMap.get(key); 27 if (m == null) { 28 m = new HashMap(); 29 mMap.put(key, m); 30 } 31 m.put(version, value); 32 } 33 34 37 public Object get(Object version, Object key) { 38 Map m = (Map)mMap.get(key); 39 if (m == null) return null; 40 return m.get(version); 41 } 42 43 46 public Set keySet() { 47 return mMap.keySet(); 48 } 49 50 53 public Map getVersions(Object key) { 54 return (Map)mMap.get(key); 55 } 56 57 60 public int size() { 61 return mMap.size(); 62 } 63 } 64 | Popular Tags |