3261N/A * Copyright (c) 1996, 2010, Oracle and/or its affiliates. All rights reserved. 0N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 0N/A * This code is free software; you can redistribute it and/or modify it 0N/A * under the terms of the GNU General Public License version 2 only, as 2362N/A * published by the Free Software Foundation. Oracle designates this 0N/A * particular file as subject to the "Classpath" exception as provided 2362N/A * by Oracle in the LICENSE file that accompanied this code. 0N/A * This code is distributed in the hope that it will be useful, but WITHOUT 0N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 0N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 0N/A * version 2 for more details (a copy is included in the LICENSE file that 0N/A * accompanied this code). 0N/A * You should have received a copy of the GNU General Public License version 0N/A * 2 along with this work; if not, write to the Free Software Foundation, 0N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 2362N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 2362N/A * or visit www.oracle.com if you need additional information or have any 0N/A * (C) Copyright Taligent, Inc. 1996, 1997 - All Rights Reserved 0N/A * (C) Copyright IBM Corp. 1996 - 1998 - All Rights Reserved 0N/A * The original version of this source code and documentation 0N/A * is copyrighted and owned by Taligent, Inc., a wholly-owned 0N/A * subsidiary of IBM. These materials are provided under terms 0N/A * of a License Agreement between Taligent and Sun. This technology 0N/A * is protected by multiple US and International patents. 0N/A * This notice and attribution to Taligent may not be removed. 0N/A * Taligent is a registered trademark of Taligent, Inc. 0N/A * <code>ListResourceBundle</code> is an abstract subclass of 0N/A * <code>ResourceBundle</code> that manages resources for a locale 0N/A * in a convenient and easy to use list. See <code>ResourceBundle</code> for 0N/A * more information about resource bundles in general. 0N/A * Subclasses must override <code>getContents</code> and provide an array, 0N/A * where each item in the array is a pair of objects. 0N/A * The first element of each pair is the key, which must be a 0N/A * <code>String</code>, and the second element is the value associated with 0N/A * The following <a name="sample">example</a> shows two members of a resource 0N/A * bundle family with the base name "MyResources". 0N/A * "MyResources" is the default member of the bundle family, and 0N/A * "MyResources_fr" is the French member. 0N/A * These members are based on <code>ListResourceBundle</code> 0N/A * how you can add a bundle to this family that's based on a properties file). 0N/A * The keys in this example are of the form "s1" etc. The actual 0N/A * keys are entirely up to your choice, so long as they are the same as 0N/A * the keys you use in your program to retrieve the objects from the bundle. 0N/A * Keys are case-sensitive. 0N/A * public class MyResources extends ListResourceBundle { 0N/A * protected Object[][] getContents() { 0N/A * {"s1", "The disk \"{1}\" contains {0}."}, // MessageFormat pattern 0N/A * {"s2", "1"}, // location of {0} in pattern 0N/A * {"s3", "My Disk"}, // sample disk name 0N/A * {"s4", "no files"}, // first ChoiceFormat choice 0N/A * {"s5", "one file"}, // second ChoiceFormat choice 0N/A * {"s6", "{0,number} files"}, // third ChoiceFormat choice 0N/A * {"s7", "3 Mar 96"}, // sample date 0N/A * {"s8", new Dimension(1,5)} // real object, not just string 0N/A * // END OF MATERIAL TO LOCALIZE 0N/A * public class MyResources_fr extends ListResourceBundle { 0N/A * protected Object[][] getContents() { 0N/A * return new Object[][] = { 0N/A * {"s1", "Le disque \"{1}\" {0}."}, // MessageFormat pattern 0N/A * {"s2", "1"}, // location of {0} in pattern 0N/A * {"s3", "Mon disque"}, // sample disk name 0N/A * {"s4", "ne contient pas de fichiers"}, // first ChoiceFormat choice 0N/A * {"s5", "contient un fichier"}, // second ChoiceFormat choice 0N/A * {"s6", "contient {0,number} fichiers"}, // third ChoiceFormat choice 0N/A * {"s7", "3 mars 1996"}, // sample date 0N/A * {"s8", new Dimension(1,3)} // real object, not just string 0N/A * // END OF MATERIAL TO LOCALIZE 0N/A * @see ResourceBundle 0N/A * @see PropertyResourceBundle 0N/A * Sole constructor. (For invocation by subclass constructors, typically 0N/A // Implements java.util.ResourceBundle.handleGetObject; inherits javadoc specification. 0N/A // lazily load the lookup hashtable. 0N/A * Returns an <code>Enumeration</code> of the keys contained in 0N/A * this <code>ResourceBundle</code> and its parent bundles. 0N/A * @return an <code>Enumeration</code> of the keys contained in 0N/A * this <code>ResourceBundle</code> and its parent bundles. 0N/A // lazily load the lookup hashtable. 0N/A * Returns a <code>Set</code> of the keys contained 0N/A * <em>only</em> in this <code>ResourceBundle</code>. 0N/A * @return a <code>Set</code> of the keys contained only in this 0N/A * <code>ResourceBundle</code> 0N/A * Returns an array in which each item is a pair of objects in an 0N/A * <code>Object</code> array. The first element of each pair is 0N/A * the key, which must be a <code>String</code>, and the second 0N/A * element is the value associated with that key. See the class 0N/A * description for details. 0N/A * @return an array of an <code>Object</code> array representing a 0N/A // ==================privates==================== 0N/A * We lazily load the lookup hashtable. This function does the 0N/A // key must be non-null String, value must be non-null