src/share/classes/java/util/ListResourceBundle.java

Print this page
rev 10048 : 8044740: Convert all JDK versions used in @since tag to 1.n[.n] in jdk repo
Reviewed-by:


  96  *             {"s3", "Mon disque"},                      // sample disk name
  97  *             {"s4", "ne contient pas de fichiers"},     // first ChoiceFormat choice
  98  *             {"s5", "contient un fichier"},             // second ChoiceFormat choice
  99  *             {"s6", "contient {0,number} fichiers"},    // third ChoiceFormat choice
 100  *             {"s7", "3 mars 1996"},                     // sample date
 101  *             {"s8", new Dimension(1,3)}                 // real object, not just string
 102  *         // END OF MATERIAL TO LOCALIZE
 103  *         };
 104  *     }
 105  * }
 106  * </pre>
 107  * </blockquote>
 108  *
 109  * <p>
 110  * The implementation of a {@code ListResourceBundle} subclass must be thread-safe
 111  * if it's simultaneously used by multiple threads. The default implementations
 112  * of the methods in this class are thread-safe.
 113  *
 114  * @see ResourceBundle
 115  * @see PropertyResourceBundle
 116  * @since JDK1.1
 117  */
 118 public abstract class ListResourceBundle extends ResourceBundle {
 119     /**
 120      * Sole constructor.  (For invocation by subclass constructors, typically
 121      * implicit.)
 122      */
 123     public ListResourceBundle() {
 124     }
 125 
 126     // Implements java.util.ResourceBundle.handleGetObject; inherits javadoc specification.
 127     public final Object handleGetObject(String key) {
 128         // lazily load the lookup hashtable.
 129         if (lookup == null) {
 130             loadLookup();
 131         }
 132         if (key == null) {
 133             throw new NullPointerException();
 134         }
 135         return lookup.get(key); // this class ignores locales
 136     }




  96  *             {"s3", "Mon disque"},                      // sample disk name
  97  *             {"s4", "ne contient pas de fichiers"},     // first ChoiceFormat choice
  98  *             {"s5", "contient un fichier"},             // second ChoiceFormat choice
  99  *             {"s6", "contient {0,number} fichiers"},    // third ChoiceFormat choice
 100  *             {"s7", "3 mars 1996"},                     // sample date
 101  *             {"s8", new Dimension(1,3)}                 // real object, not just string
 102  *         // END OF MATERIAL TO LOCALIZE
 103  *         };
 104  *     }
 105  * }
 106  * </pre>
 107  * </blockquote>
 108  *
 109  * <p>
 110  * The implementation of a {@code ListResourceBundle} subclass must be thread-safe
 111  * if it's simultaneously used by multiple threads. The default implementations
 112  * of the methods in this class are thread-safe.
 113  *
 114  * @see ResourceBundle
 115  * @see PropertyResourceBundle
 116  * @since 1.1
 117  */
 118 public abstract class ListResourceBundle extends ResourceBundle {
 119     /**
 120      * Sole constructor.  (For invocation by subclass constructors, typically
 121      * implicit.)
 122      */
 123     public ListResourceBundle() {
 124     }
 125 
 126     // Implements java.util.ResourceBundle.handleGetObject; inherits javadoc specification.
 127     public final Object handleGetObject(String key) {
 128         // lazily load the lookup hashtable.
 129         if (lookup == null) {
 130             loadLookup();
 131         }
 132         if (key == null) {
 133             throw new NullPointerException();
 134         }
 135         return lookup.get(key); // this class ignores locales
 136     }