1 11 package org.eclipse.debug.internal.ui.views.memory; 12 13 import java.util.ArrayList ; 14 import java.util.Enumeration ; 15 import java.util.Hashtable ; 16 17 import org.eclipse.debug.core.model.IMemoryBlock; 18 19 20 34 public class SynchronizeInfo 35 { 36 private IMemoryBlock fBlock; private Hashtable fProperties; 39 43 public SynchronizeInfo(IMemoryBlock block) 44 { 45 fBlock = block; 46 fProperties = new Hashtable (); 47 } 48 49 50 55 public void setProperty(String propertyId, Object value) 56 { 57 if (propertyId == null) 58 return; 59 60 if (value == null) 61 return; 62 63 fProperties.put(propertyId, value); 64 } 65 66 71 public Object getProperty(String propertyId) 72 { 73 if (propertyId == null) 74 return null; 75 76 Object value = fProperties.get(propertyId); 77 78 return value; 79 } 80 81 84 public String [] getPropertyIds() 85 { 86 if (fProperties == null) 87 return new String [0]; 88 89 Enumeration enumeration = fProperties.keys(); 90 ArrayList ids = new ArrayList (); 91 92 while (enumeration.hasMoreElements()) 93 { 94 ids.add(enumeration.nextElement()); 95 } 96 97 return (String [])ids.toArray(new String [ids.size()]); 98 } 99 100 103 public void delete() 104 { 105 106 if (fProperties != null){ 107 fProperties.clear(); 108 fProperties = null; 109 } 110 111 if (fBlock != null){ 112 fBlock = null; 113 } 114 } 115 } 116 | Popular Tags |