InternationalString (Java EE 5)

Java EE API


javax.xml.registry.infomodel Interface InternationalString


public interface InternationalString


此接口表示已经国际化到几个 Locale 中的 String。当 String 属性必须是国际化格式时,使用此接口替代 String 类型。InternationalString 接口的实例由 LocalizedString 实例所组成的 Collection 组成,其中每个 String 对应于一个特定的 Locale。InternationalString 接口提供了一些 set/get 方法,用于添加或获取 InternationalString 实例特定于语言环境的 String 值。
英文文档:

This interface represents a String that has been internationalized into several Locales. This interface is used as a replacement for the String type whenever a String attribute needs to be I18N capable. An instance of the InternationalString interface composes within it a Collection of LocalizedString instances, where each String is specific to a particular Locale. The InternationalString interface provides set/get methods for adding or getting locale specific String values for the InternationalString instance.

Author:
Farrukh S. Najmi
See Also:
LocalizedString

Method Summary
 void
 void
 LocalizedString
 Collection
 String
 String
 void
 void
 void
 void
 

Method Detail

public String getValue() throws JAXRException
获取对应于 Locale.getDefault() 所返回 Locale 的 String 值。

功能级别:0
return 对应于 Locale.getDefault() 所返回 Locale 的 String 值
ThrowsJAXRException: 如果 JAXR 提供者遇到内部错误
英文文档:

getValue

String getValue()
                throws JAXRException
Gets the String value for the Locale returned by Locale.getDefault().

Capability Level: 0

Returns:
the String value for the Locale returned by Locale.getDefault()
Throws:
JAXRException - If the JAXR provider encounters an internal error

public String getValue(java.util.Locale locale) throws JAXRException
获取对应于指定 Locale 的 String 值。如果没有找到对应于指定语言环境的特定于语言环境的值,则返回 null。

功能级别:0
locale 所需值的 Locale
return 对应于指定 Locale 的 String 值
ThrowsJAXRException: 如果 JAXR 提供者遇到内部错误
英文文档:

getValue

String getValue(Locale locale)
                throws JAXRException
Gets the String value for the specified Locale. Return null if no locale specific value is found for the specified locale.

Capability Level: 0

Parameters:
locale - The Locale for the desired value
Returns:
the String value for the specified Locale
Throws:
JAXRException - If the JAXR provider encounters an internal error

public void setValue(String value) throws JAXRException
设置对应于 Locale.getDefault() 所返回 Locale 的 String 值。

功能级别:0
value 对应于 Locale.getDefault() 所返回 Locale 的 String 值
ThrowsJAXRException: 如果 JAXR 提供者遇到内部错误
英文文档:

setValue

void setValue(String value)
              throws JAXRException
Sets the String value for the Locale returned by Locale.getDefault().

Capability Level: 0

Parameters:
value - the String value for the Locale returned by Locale.getDefault()
Throws:
JAXRException - If the JAXR provider encounters an internal error

public void setValue(java.util.Locale locale, String value) throws JAXRException
设置对应于指定 Locale 的 String 值。

功能级别:0
locale 将设置此值的语言环境
value 将设置的值
ThrowsJAXRException: 如果 JAXR 提供者遇到内部错误
英文文档:

setValue

void setValue(Locale locale,
              String value)
              throws JAXRException
Sets the String value for the specified Locale.

Capability Level: 0

Parameters:
locale - The locale for this value being set
value - The value being set
Throws:
JAXRException - If the JAXR provider encounters an internal error

public void addLocalizedString(LocalizedString localizedString) throws JAXRException
将 LocalizedString 添加到此对象。

功能级别:0
localizedString 将添加到此对象的 LocalizedString
ThrowsJAXRException: 如果 JAXR 提供者遇到内部错误
英文文档:

addLocalizedString

void addLocalizedString(LocalizedString localizedString)
                        throws JAXRException
Adds a LocalizedString to this object.

Capability Level: 0

Parameters:
localizedString - the LocalizedString being added to this object
Throws:
JAXRException - If the JAXR provider encounters an internal error

public void addLocalizedStrings(java.util.Collection<E> localizedStrings) throws JAXRException
将多个 LocalizedString 添加到此对象。

功能级别:0
localizedStrings 将添加到此对象的 LocalizedString 所组成的 Collection
ThrowsJAXRException: 如果 JAXR 提供者遇到内部错误
英文文档:

addLocalizedStrings

void addLocalizedStrings(Collection localizedStrings)
                         throws JAXRException
Adds many LocalizedStrings to this object.

Capability Level: 0

Parameters:
localizedStrings - the Collection of LocalizedStrings being added to this object
Throws:
JAXRException - If the JAXR provider encounters an internal error

public void removeLocalizedString(LocalizedString localizedString) throws JAXRException
从此对象中移除一个 LocalizedString。

功能级别:0
localizedString 将从此对象中移除的 LocalizedString
ThrowsJAXRException: 如果 JAXR 提供者遇到内部错误
英文文档:

removeLocalizedString

void removeLocalizedString(LocalizedString localizedString)
                           throws JAXRException
Removes a LocalizedString from this object.

Capability Level: 0

Parameters:
localizedString - the LocalizedString being removed from this object
Throws:
JAXRException - If the JAXR provider encounters an internal error

public void removeLocalizedStrings(java.util.Collection<E> localizedStrings) throws JAXRException
移除此对象的指定 LocalizedString。

功能级别:0
localizedStrings 将从此对象中移除的 LocalizedString 所组成的 Collection
ThrowsJAXRException: 如果 JAXR 提供者遇到内部错误
英文文档:

removeLocalizedStrings

void removeLocalizedStrings(Collection localizedStrings)
                            throws JAXRException
Removes specified LocalizedStrings to this object.

Capability Level: 0

Parameters:
localizedStrings - the Collection of LocalizedStrings being removed from this object
Throws:
JAXRException - If the JAXR provider encounters an internal error

public LocalizedString getLocalizedString(java.util.Locale locale, String charsetName) throws JAXRException
获取对应于指定 Locale 和 charsetName 的 LocalizedString。

功能级别:0
locale 所需 LocalizedString 的语言环境
charsetName 所需 LocalizedString 的字符集名称
return 与指定语言环境和字符集匹配的 LocalizedString
ThrowsJAXRException: 如果 JAXR 提供者遇到内部错误
英文文档:

getLocalizedString

LocalizedString getLocalizedString(Locale locale,
                                   String charsetName)
                                   throws JAXRException
Gets the LocalizedString for the specified Locale and charsetName.

Capability Level: 0

Parameters:
locale - The loacle for the desired LocalizedStrings
charsetName - The character set name for the desired LocalizedStrings
Returns:
the LocalizedString that matches specified locale and character set
Throws:
JAXRException - If the JAXR provider encounters an internal error

public java.util.Collection<E> getLocalizedStrings() throws JAXRException
返回与此对象关联的 LocalizedString。

功能级别:0
return LocalizedString 实例所组成的 Collection。Collection 可以为空,但不能为 null。
ThrowsJAXRException: 如果 JAXR 提供者遇到内部错误
See also javax.xml.registry.infomodel.LocalizedString
英文文档:

getLocalizedStrings

Collection getLocalizedStrings()
                               throws JAXRException
Returns the LocalizedStrings associated with this object.

Capability Level: 0

Returns:
Collection of LocalizedString instances. The Collection may be empty but not null.
Throws:
JAXRException - If the JAXR provider encounters an internal error
See Also:
LocalizedString


Submit a bug or feature

Copyright 2007 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.

一看就知道只有菜鸟才干这么无知的事啦。

PS : 未经我党受权你也可自由散发此文档。 如有任何错误请自行修正;若因此而造成任何损失请直接找人民主席,请勿与本人联系。谢谢!