GeomConverter/src/org/lcsim/geometry/util
diff -N ExpandedIdentifier.java
--- ExpandedIdentifier.java 15 Feb 2006 01:17:26 -0000 1.3
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,74 +0,0 @@
-package org.lcsim.geometry.util;
-
-import java.util.LinkedHashMap;
-import java.util.Map;
-import java.util.Set;
-
-public class ExpandedIdentifier
-implements org.lcsim.geometry.ExpandedIdentifier
-{
- Map<String, Integer> map = new LinkedHashMap<String, Integer>();
-
- public ExpandedIdentifier()
- {}
-
- protected void put(String field, int value)
- {
- map.put(field, value);
- }
-
- public int get(String field)
- {
- return map.get(field);
- }
-
- public Set<String> fields()
- {
- return map.keySet();
- }
-
- // /\/\/\ from IDDecoder /\/\/\
-
- public int getValue(String field)
- {
- return get(field);
- }
-
- public int getFieldCount()
- {
- return fields().size();
- }
-
- public int getValue(int index)
- {
- Object objarr[] = map.values().toArray();
- return (Integer)objarr[index];
- }
-
- public String getFieldName(int index)
- {
- Object objarr[] = map.keySet().toArray();
- return (String)objarr[index];
- }
-
- public int getFieldIndex(String name)
- {
- Object objarr[] = map.keySet().toArray();
-
- int idx = -1;
- for (int i = 0; i < objarr.length; i++)
- {
- if (((String)objarr[i]).compareTo(name) == 0)
- {
- idx = i;
- break;
- }
- }
-
- if (idx == -1)
- {
- throw new RuntimeException(name + " field does not exist in this ID");
- }
- return idx;
- }
-}
\ No newline at end of file