X-Git-Url: http://gitweb.fperrin.net/?a=blobdiff_plain;f=jars%2Ficu4j-4_2_1-src%2Fsrc%2Fcom%2Fibm%2Ficu%2Fdev%2Ftest%2FTestDataModule.java;h=d0c096a944a25f7ed99bc345f14baf63ddeda45f;hb=127973afabe0c34015667c599d68bf9453d85652;hp=2332f20508baa3e89b126ec3ab326d43ecf6ab2c;hpb=92dfc8b7d39cbc2e55f3c547c0c265bc7ae3af86;p=Dictionary.git diff --git a/jars/icu4j-4_2_1-src/src/com/ibm/icu/dev/test/TestDataModule.java b/jars/icu4j-4_2_1-src/src/com/ibm/icu/dev/test/TestDataModule.java old mode 100755 new mode 100644 index 2332f20..d0c096a --- a/jars/icu4j-4_2_1-src/src/com/ibm/icu/dev/test/TestDataModule.java +++ b/jars/icu4j-4_2_1-src/src/com/ibm/icu/dev/test/TestDataModule.java @@ -1,111 +1,111 @@ -//##header -/** - ******************************************************************************* - * 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 - */ - 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 - */ - public Iterator getSettingsIterator(); - /** - * @return Iterator - */ - 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); - } -} - +//##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 + */ + 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 + */ + public Iterator getSettingsIterator(); + /** + * @return Iterator + */ + 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); + } +} +