Changeset 187
- Timestamp:
- 09/23/11 04:23:50 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/data/GlobalDataContainer.java
r171 r187 5 5 import java.io.ObjectOutputStream; 6 6 import java.io.Serializable; 7 import java.util.Collection; 7 8 import java.util.HashMap; 9 import java.util.LinkedList; 10 import java.util.List; 8 11 import java.util.Map; 12 import java.util.Map.Entry; 13 14 import de.ugoe.cs.eventbench.models.IStochasticProcess; 9 15 10 16 /** … … 172 178 } 173 179 180 /** 181 * <p> 182 * Returns all keys of collections of sequences contained in the storage. 183 * </p> 184 * 185 * @return keys of all collections of sequences contained in the storage 186 */ 187 public Collection<String> getAllSequencesNames() { 188 Collection<String> allSequencesNames = new LinkedList<String>(); 189 for (Entry<String, Object> entry : dataObjects.entrySet()) { 190 if (entry.getValue() instanceof Collection<?>) { 191 Object listObj = ((Collection<?>) entry.getValue()).iterator() 192 .next(); 193 if (listObj instanceof List<?>) { 194 if (((List<?>) listObj).iterator().next() instanceof Event<?>) { 195 allSequencesNames.add(entry.getKey()); 196 } 197 } 198 } 199 } 200 return allSequencesNames; 201 } 202 203 /** 204 * <p> 205 * Returns the keys of all {@link IStochasticProcess}s contained in the 206 * storage 207 * </p> 208 * 209 * @return keys of all {@link IStochasticProcess}s contained in the storage 210 */ 211 public Collection<String> getAllModelNames() { 212 Collection<String> modelNames = new LinkedList<String>(); 213 for (Entry<String, Object> entry : dataObjects.entrySet()) { 214 if (entry.getValue() instanceof IStochasticProcess) { 215 modelNames.add(entry.getKey()); 216 } 217 } 218 return modelNames; 219 } 220 174 221 }
Note: See TracChangeset
for help on using the changeset viewer.