]> gitweb.fperrin.net Git - Dictionary.git/blobdiff - jars/icu4j-4_2_1-src/src/com/ibm/icu/dev/test/TestDataModule.java
go
[Dictionary.git] / jars / icu4j-4_2_1-src / src / com / ibm / icu / dev / test / TestDataModule.java
old mode 100755 (executable)
new mode 100644 (file)
index 2332f20..d0c096a
-//##header\r
-/**\r
- *******************************************************************************\r
- * Copyright (C) 2001-2009, International Business Machines Corporation and    *\r
- * others. All Rights Reserved.                                                *\r
- *******************************************************************************\r
- */\r
-package com.ibm.icu.dev.test;\r
-\r
-import java.util.Iterator;\r
-\r
-/**\r
- * Represents a collection of test data described in a file.\r
- * \r
- */\r
-public interface TestDataModule {\r
-    /**\r
-     * Return the name of this test data module.\r
-     */\r
-    public String getName();\r
-\r
-    /**\r
-     * Get additional data related to the module, e.g. DESCRIPTION,\r
-     * global settings.  Might be null.\r
-     */\r
-    public DataMap getInfo();\r
-\r
-    /**\r
-     * Returns the TestData corresponding to name, or null if name not\r
-     * found in this module.  Throw error if name is not found.  \r
-     * @throws DataModuleFormatError\r
-     */\r
-    public TestData getTestData(String name) throws DataModuleFormatError;\r
-\r
-    /**\r
-     * @return Iterator<TestData>\r
-     */\r
-    public Iterator getTestDataIterator();\r
-\r
-    public static class Factory{\r
-\r
-        static final TestDataModule get(String baseName, String localeName) throws DataModuleFormatError {\r
-            return new ResourceModule(baseName, localeName);\r
-        }\r
-    }\r
-\r
-    public static class DataModuleFormatError extends Exception{\r
-        /**\r
-         * For serialization\r
-         */\r
-        private static final long serialVersionUID = 4312521272388482529L;\r
-        public DataModuleFormatError(String msg){\r
-            super(msg);\r
-        }\r
-//#if defined(FOUNDATION10) || defined(J2SE13)\r
-//#else\r
-        public DataModuleFormatError(String msg, Throwable cause){\r
-            super(msg, cause);\r
-        }\r
-        public DataModuleFormatError(Throwable cause) {\r
-            super(cause);\r
-        }\r
-//#endif\r
-    }\r
-    \r
-    /**\r
-     * Represents a single test in the module.\r
-     */\r
-    public static interface TestData {\r
-        public String getName();\r
-        /**\r
-         * Get additional data related to the test data, e.g. DESCRIPTION,\r
-         * global settings.  Might be null.\r
-         */\r
-        public DataMap getInfo();\r
-        /**\r
-         * @return Iterator<DataMap>\r
-         */\r
-        public Iterator getSettingsIterator();\r
-        /**\r
-         * @return Iterator<DataMap>\r
-         */\r
-        public Iterator getDataIterator();\r
-    }\r
-\r
-    /**\r
-     * Map-like interface for accessing key-value pairs by key.\r
-     * If the vaule is not found by given key, return null. \r
-     * The behavior is analogous the get() method of the Map interface.\r
-     * \r
-     * @author Raymond Yang\r
-     */\r
-    public interface DataMap {\r
-//    public abstract boolean    isDefined(String key);\r
-//\r
-    public abstract Object     getObject(String key);\r
-    public abstract String     getString(String key);\r
-//    public abstract char       getChar(String key);\r
-//    public abstract int        getInt(String key);\r
-//    public abstract byte       getByte(String key);\r
-//    public abstract boolean    getBoolean(String key);\r
-//\r
-//    public abstract Object[]   getObjectArray(String key);\r
-//    public abstract String[]   getStringArray(String key);\r
-//    public abstract char[]     getCharArray(String key);\r
-//    public abstract int[]      getIntArray(String key);\r
-//    public abstract byte[]     getByteArray(String key);\r
-//    public abstract boolean[]  getBooleanArray(String key);\r
-    }\r
-}\r
-    \r
+//##header J2SE15
+/**
+ *******************************************************************************
+ * Copyright (C) 2001-2009, International Business Machines Corporation and    *
+ * others. All Rights Reserved.                                                *
+ *******************************************************************************
+ */
+package com.ibm.icu.dev.test;
+
+import java.util.Iterator;
+
+/**
+ * Represents a collection of test data described in a file.
+ * 
+ */
+public interface TestDataModule {
+    /**
+     * Return the name of this test data module.
+     */
+    public String getName();
+
+    /**
+     * Get additional data related to the module, e.g. DESCRIPTION,
+     * global settings.  Might be null.
+     */
+    public DataMap getInfo();
+
+    /**
+     * Returns the TestData corresponding to name, or null if name not
+     * found in this module.  Throw error if name is not found.  
+     * @throws DataModuleFormatError
+     */
+    public TestData getTestData(String name) throws DataModuleFormatError;
+
+    /**
+     * @return Iterator<TestData>
+     */
+    public Iterator getTestDataIterator();
+
+    public static class Factory{
+
+        static final TestDataModule get(String baseName, String localeName) throws DataModuleFormatError {
+            return new ResourceModule(baseName, localeName);
+        }
+    }
+
+    public static class DataModuleFormatError extends Exception{
+        /**
+         * For serialization
+         */
+        private static final long serialVersionUID = 4312521272388482529L;
+        public DataModuleFormatError(String msg){
+            super(msg);
+        }
+//#if defined(FOUNDATION10) || defined(J2SE13)
+//#else
+        public DataModuleFormatError(String msg, Throwable cause){
+            super(msg, cause);
+        }
+        public DataModuleFormatError(Throwable cause) {
+            super(cause);
+        }
+//#endif
+    }
+    
+    /**
+     * Represents a single test in the module.
+     */
+    public static interface TestData {
+        public String getName();
+        /**
+         * Get additional data related to the test data, e.g. DESCRIPTION,
+         * global settings.  Might be null.
+         */
+        public DataMap getInfo();
+        /**
+         * @return Iterator<DataMap>
+         */
+        public Iterator getSettingsIterator();
+        /**
+         * @return Iterator<DataMap>
+         */
+        public Iterator getDataIterator();
+    }
+
+    /**
+     * Map-like interface for accessing key-value pairs by key.
+     * If the vaule is not found by given key, return null. 
+     * The behavior is analogous the get() method of the Map interface.
+     * 
+     * @author Raymond Yang
+     */
+    public interface DataMap {
+//    public abstract boolean    isDefined(String key);
+//
+    public abstract Object     getObject(String key);
+    public abstract String     getString(String key);
+//    public abstract char       getChar(String key);
+//    public abstract int        getInt(String key);
+//    public abstract byte       getByte(String key);
+//    public abstract boolean    getBoolean(String key);
+//
+//    public abstract Object[]   getObjectArray(String key);
+//    public abstract String[]   getStringArray(String key);
+//    public abstract char[]     getCharArray(String key);
+//    public abstract int[]      getIntArray(String key);
+//    public abstract byte[]     getByteArray(String key);
+//    public abstract boolean[]  getBooleanArray(String key);
+    }
+}
+