1 28 29 package org.objectweb.util.explorer.plugin.java.map; 30 31 import org.objectweb.util.explorer.api.Context; 32 import org.objectweb.util.explorer.api.Entry; 33 import org.objectweb.util.explorer.core.naming.lib.DefaultEntry; 34 35 43 public class MapContext 44 implements Context 45 { 46 47 53 59 65 71 75 public Entry[] getEntries(Object value) 76 { 77 java.util.Map map = (java.util.Map )value; 78 79 Entry[] entries = new Entry[map.size()]; 81 82 Object [] keys = map.keySet().toArray(); 84 Object [] elements = map.values().toArray(); 85 for (int i = 0; i < entries.length; i++) 86 { 87 entries[i] = new DefaultEntry(keys[i].toString(), elements[i]); 88 } 89 return entries; 90 } 91 92 } | Popular Tags |