Mail Archive Home | clif-commits List | Febuary 2007 Index
| <-- Date Index --> | <-- Thread Index --> |
Date: Friday, February 23, 2007 @ 14:19:15
Author: dillense
Path: /cvsroot/clif/src/org/objectweb/clif/scenario/isac/egui/plugins/gui
Modified: GUIDescriptionParser.java
changed from Hashtable raw type to Map/HashMap generic types
---------------------------+
GUIDescriptionParser.java | 46 ++++++++++++++++++++++----------------------
1 files changed, 24 insertions(+), 22 deletions(-)
Index:
src/org/objectweb/clif/scenario/isac/egui/plugins/gui/GUIDescriptionParser.java
diff -u
src/org/objectweb/clif/scenario/isac/egui/plugins/gui/GUIDescriptionParser.java:1.5
src/org/objectweb/clif/scenario/isac/egui/plugins/gui/GUIDescriptionParser.java:1.6
---
src/org/objectweb/clif/scenario/isac/egui/plugins/gui/GUIDescriptionParser.java:1.5
Mon Feb 19 17:06:15 2007
+++
src/org/objectweb/clif/scenario/isac/egui/plugins/gui/GUIDescriptionParser.java
Fri Feb 23 14:19:14 2007
@@ -24,7 +24,10 @@
package org.objectweb.clif.scenario.isac.egui.plugins.gui;
import java.util.Enumeration;
+import java.util.HashMap;
import java.util.Hashtable;
+import java.util.Iterator;
+import java.util.Map;
import java.util.Vector;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
@@ -90,7 +93,7 @@
* @return a Vector containing the errors
*/
public static Vector loadGUIDescriptionFile(Vector ids, String
fileName,
- PluginDescription plugin, Hashtable panels) {
+ PluginDescription plugin,
Map<String,ParametersWidgetsNode> panels) {
Vector result = null;
Document document = null;
DocumentBuilderFactory factory = null;
@@ -143,13 +146,13 @@
} else if (nodesName.get(i).equals(TIMER)) {
Hashtable timers = plugin.getTimers();
Hashtable remaindingTimers = (Hashtable)
timers.clone();
- Hashtable hashtablePWN = new Hashtable();
+ Map<String,ParametersWidgetsNode>
hashtablePWN = new HashMap<String,ParametersWidgetsNode>();
visitDOM2(hashtablePWN, document,
nodesName.get(i).toString(),
timers);
if (hashtablePWN.size() != 0) {
- Enumeration keys =
hashtablePWN.keys();
- while (keys.hasMoreElements()) {
- String key = (String)
keys.nextElement();
+ Iterator keys =
hashtablePWN.keySet().iterator();
+ while (keys.hasNext()) {
+ String key = (String)
keys.next();
if (timers.containsKey(key)) {
TimerDescription temp
= (TimerDescription)timers.get(key);
@@ -181,12 +184,12 @@
} else if (nodesName.get(i).equals(TEST)) {
Hashtable tests = plugin.getTests();
Hashtable remaindingTests = (Hashtable)
tests.clone();
- Hashtable hashtablePWN = new Hashtable();
+ Map<String,ParametersWidgetsNode>
hashtablePWN = new HashMap<String,ParametersWidgetsNode>();
visitDOM2(hashtablePWN, document,
nodesName.get(i).toString(), tests);
if (hashtablePWN.size() != 0) {
- Enumeration keys =
hashtablePWN.keys();
- while (keys.hasMoreElements()) {
- String key = (String)
keys.nextElement();
+ Iterator keys =
hashtablePWN.keySet().iterator();
+ while (keys.hasNext()) {
+ String key = (String)
keys.next();
if (tests.containsKey(key)) {
TestDescription temp
= (TestDescription)tests.get(key);
@@ -218,13 +221,12 @@
} else if (nodesName.get(i).equals(SAMPLE)) {
Hashtable samples = plugin.getSamples();
Hashtable remaindingSamples = (Hashtable)
samples.clone();
- Hashtable hashtablePWN = new Hashtable();
- visitDOM2(hashtablePWN, document,
nodesName.get(i).toString(),
- samples);
+ Map<String,ParametersWidgetsNode>
hashtablePWN = new HashMap<String,ParametersWidgetsNode>();
+ visitDOM2(hashtablePWN, document,
nodesName.get(i).toString(), samples);
if (hashtablePWN.size() != 0) {
- Enumeration keys =
hashtablePWN.keys();
- while (keys.hasMoreElements()) {
- String key = (String)
keys.nextElement();
+ Iterator keys =
hashtablePWN.keySet().iterator();
+ while (keys.hasNext()) {
+ String key = (String)
keys.next();
if (samples.containsKey(key))
{
SampleDescription
temp =
(SampleDescription) samples.get(key);
@@ -257,13 +259,13 @@
} else if (nodesName.get(i).equals(CONTROL)) {
Hashtable controls = plugin.getControls();
Hashtable remaindingControls = (Hashtable) controls.clone();
- Hashtable hashtablePWN = new Hashtable();
+ Map<String,ParametersWidgetsNode> hashtablePWN = new
HashMap<String,ParametersWidgetsNode>();
visitDOM2(hashtablePWN, document,
nodesName.get(i).toString(),
controls);
if (hashtablePWN.size() != 0) {
- Enumeration keys = hashtablePWN.keys();
- while (keys.hasMoreElements()) {
- String key = (String) keys.nextElement();
+ Iterator keys = hashtablePWN.keySet().iterator();
+ while (keys.hasNext()) {
+ String key = (String) keys.next();
if (controls.containsKey(key)) {
ControlDescription temp =
(ControlDescription) controls.get(key);
@@ -297,7 +299,7 @@
return result;
}
- private static int findNewIntKey(Hashtable panels, int intKey) {
+ private static int findNewIntKey(Map<String,ParametersWidgetsNode>
panels, int intKey) {
while (panels.containsKey(String.valueOf(intKey))) {
intKey++;
}
@@ -588,7 +590,7 @@
* @param tagName
* @param plugins
*/
- private static void visitDOM2(Hashtable hashtable, Node node,
+ private static void visitDOM2(Map<String,ParametersWidgetsNode>
hashtable, Node node,
String tagName, Hashtable plugins) {
if (node == null)
{
@@ -631,7 +633,7 @@
}
result = visitDOM(node,
tagName, parametersNames);
if (result != null) {
- hashtable.put(name,
result);
+
hashtable.put((String)name, result);
}
}
}
| <-- Date Index --> | <-- Thread Index --> |
Powered by MHonArc.
Copyright © 2006-2007, OW2 Consortium | contact | webmaster.