JavaTM 2 Platform
Standard Ed. 5.0

java.util
Ŭ·¡½º ListResourceBundle

java.lang.Object 
  »óÀ§¸¦ È®Àå java.util.ResourceBundle 
      »óÀ§¸¦ È®Àå java.util.ListResourceBundle
¾Ë·ÁÁø Á÷°è ¼­ºê Ŭ·¡½º:
AccessibleResourceBundle

public abstract class ListResourceBundle
extends ResourceBundle

ListResourceBundle´Â ¸®½ºÆ®¸¦ Æí¸®ÇÏ°í ¿ëÀÌÇÏ°Ô »ç¿ëÇÒ ¼ö ÀÖ´Â ·ÎÄÉÀÏ¿¡ ´ëÇÑ ÀÚ¿øÀ» °ü¸®ÇÏ´Â ResourceBundle abstract ¼­ºê Ŭ·¡½ºÀÔ´Ï´Ù. ÀÚ¿ø ¹øµé ÀϹÝÀûÀ¸·Î ºÙ¾î¼­´Â ResourceBundle¸¦ ÂüÁ¶ÇϽʽÿÀ.

¼­ºê Ŭ·¡½º´Â getContents¸¦ ¿À¹ö¶óÀ̵å(override) ÇØ, ¹è¿­À» Á¦°øÇÏÁö ¾ÊÀ¸¸é ¾ÈµË´Ï´Ù. ÀÌ °æ¿ì ¹è¿­ÀÇ °¢ Ç׸ñÀº °´Ã¼ÀÇ Æä¾îÀÔ´Ï´Ù. °¢ Æä¾îÀÇ ÃÖÃÊÀÇ ¿ä¼Ò´Â String Å°·Î 2¹ø°ÀÇ ¿ä¼Ò´Â ÀÌ Å°¿¡ °ü·ÃµÈ °ªÀÔ´Ï´Ù.

´ÙÀ½ÀÇ ¿¹´Â º£À̽º¸í ¡¸MyResources¡¹ÀÇ ÀÚ¿ø ¹øµé Æйи®ÀÇ 2°³ÀÇ ¸â¹ö¸¦ ³ªÅ¸³À´Ï´Ù. ¡¸MyResources¡¹´Â ¹øµé Æйи®ÀÇ µðÆúÆ®ÀÇ ¸â¹ö·Î ¡¸MyResources_fr¡¹´Â ÇÁ¶û½ºÀÇ ¸â¹öÀÔ´Ï´Ù. ÀÌ·¯ÇÑ ¸â¹ö´Â ListResourceBundle¿¡ ±Ù°ÅÇÏ°í ÀÖ½À´Ï´Ù (°ü·Ã¿¹¿¡¼­´Â ÇÁ·ÎÆÛƼ ÆÄÀÏ¿¡ ±Ù°ÅÇÏÁö ¾Ê´Â ÀÌ Æйи®¿¡°Ô ¹øµéÀ» Ãß°¡ÇÏ´Â ¹æ¹ýÀ» ³ªÅ¸³À´Ï´Ù). ÀÌ ¿¹ÀÇ Å°ÀÇ Çü½ÄÀº s1 µîÀÔ´Ï´Ù. ½ÇÁ¦ÀÇ Å°´Â ¹øµé·ÎºÎÅÍ °´Ã¼¸¦ ²¨³»±â À§Çؼ­ ÇÁ·Î±×·¥À¸·Î »ç¿ëÇÏ´Â Å°¿Í °°Àº°¡ ¸®, ¹¹µçÁö ±¦Âú½À´Ï´Ù. Å°¿¡´Â ´ë¹®ÀÚ/¼Ò¹®ÀÚÀÇ ±¸º°ÀÌ ÀÖ½À´Ï´Ù.


 
 public class MyResources extends ListResourceBundle {
     public Object[][] getContents() {
         return contents;
     }
     static final Object[][] contents = {
     // LOCALIZE THIS
         {"s1", "The disk \"{1}\" contains {0}. "},  // MessageFormat pattern
         {"s2", "1"},                               // location of {0} in pattern
         {"s3", "My Disk"},                         // sample disk name
         {"s4", "no files"},                        // first ChoiceFormat choice
         {"s5", "one file"},                        // second ChoiceFormat choice
         {"s6", "{0, number} files"},                // third ChoiceFormat choice
         {"s7", "3 Mar 96"},                        // sample date
         {"s8", new Dimension(1,5)}                 // real object, not just string
     // END OF MATERIAL TO LOCALIZE
     };
 }

 public class MyResources_fr extends ListResourceBundle {
     public Object[][] getContents() {
         return contents;
     }
     static final Object[][] contents = {
     // LOCALIZE THIS
         {"s1", "Le disque \"{1}\" {0}. "},          // MessageFormat pattern
         {"s2", "1"},                               // location of {0} in pattern
         {"s3", "Mon disque"},                      // sample disk name
         {"s4", "ne contient pas de fichiers"},     // first ChoiceFormat choice
         {"s5", "contient un fichier"},             // second ChoiceFormat choice
         {"s6", "contient {0, number} fichiers"},    // third ChoiceFormat choice
         {"s7", "3 mars 1996"},                     // sample date
         {"s8", new Dimension(1,3)}                 // real object, not just string
     // END OF MATERIAL TO LOCALIZE
     };
 }
 

µµÀÔµÈ ¹öÀü :
JDK1. 1
°ü·Ã Ç׸ñ:
ResourceBundle, PropertyResourceBundle

ÇÊµå °³¿ä
 
Ŭ·¡½º java.util. ResourceBundle ·ÎºÎÅÍ »ó¼ÓµÈ Çʵå
parent
 
»ý¼ºÀÚ °³¿ä
ListResourceBundle ()
          À¯ÀÏÇÑ »ý¼ºÀÚ ÀÔ´Ï´Ù.
 
¸Þ¼­µå °³¿ä
protected abstract  Object [][] getContents ()
          Å¬·¡½ºÀÇ ¼³¸íÀ» ÂüÁ¶ÇϽʽÿÀ.
 Enumeration <String > getKeys ()
          ResourceBundle.getKeys ±¸ÇöÀÔ´Ï´Ù.
 Object handleGetObject (String  key)
          ÀÌ ÀÚ¿ø ¹øµé·ÎºÎÅÍ ÁöÁ¤µÈ Å°ÀÇ °´Ã¼¸¦ ÃëµæÇÕ´Ï´Ù.
 
Ŭ·¡½º java.util. ResourceBundle ·ÎºÎÅÍ »ó¼ÓµÈ ¸Þ¼­µå
getBundle, getBundle, getBundle, getLocale, getObject, getString, getStringArray, setParent
 
Ŭ·¡½º java.lang. Object ·ÎºÎÅÍ »ó¼ÓµÈ ¸Þ¼­µå
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

»ý¼ºÀÚ »ó¼¼

ListResourceBundle

public ListResourceBundle()
À¯ÀÏÇÑ »ý¼ºÀÚ ÀÔ´Ï´Ù. ¼­ºê Ŭ·¡½ºÀÇ »ý¼ºÀÚ¿¡ ÇÑ È£ÃâÀº ÀϹÝÀûÀ¸·Î ¾Ï¹¬ÀûÀΠȣÃâÀÔ´Ï´Ù.

¸Þ¼­µåÀÇ »ó¼¼

handleGetObject

public final Object  handleGetObject(String  key)
Ŭ·¡½º ResourceBundle ±â¼ú:
ÀÌ ÀÚ¿ø ¹øµé·ÎºÎÅÍ ÁöÁ¤µÈ Å°ÀÇ °´Ã¼¸¦ ÃëµæÇÕ´Ï´Ù. ÀÌ ÀÚ¿ø ¹øµéÀÌ, ÁöÁ¤µÈ Å°ÀÇ °´Ã¼¸¦ Æ÷ÇÔÇÏÁö ¾Ê´Â °æ¿ì´Â nullÀ» ¸®ÅÏÇÕ´Ï´Ù.

Á¤ÀÇ:
Ŭ·¡½º ResourceBundle ³»ÀÇ handleGetObject
ÆĶó¹ÌÅÍ:
key - ¹Ù¶÷Á÷ÇÑ °´Ã¼ÀÇ Å°
¹Ýȯ°ª:
ÁöÁ¤µÈ Å°ÀÇ °´Ã¼, ¶Ç´Â null

getKeys

public Enumeration <String > getKeys()
ResourceBundle.getKeys ±¸ÇöÀÔ´Ï´Ù.

Á¤ÀÇ:
Ŭ·¡½º ResourceBundle ³»ÀÇ getKeys

getContents

protected abstract Object [][] getContents()
Ŭ·¡½ºÀÇ ¼³¸íÀ» ÂüÁ¶ÇϽʽÿÀ.


JavaTM 2 Platform
Standard Ed. 5.0

Copyright 2004 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms . Documentation Redistribution Policy µµ ÂüÁ¶ÇϽʽÿÀ.