GemFire 6.6.2

com.gemstone.gemfire.i18n
Class StringId

java.lang.Object
  extended by com.gemstone.gemfire.i18n.StringId

public class StringId
extends Object

This class forms the basis of the i18n strategy. Its primary function is to be used as a key to be passed to an instance of StringIdResourceBundle.

Since:
6.0

Field Summary
 int id
          A unique identifier that is written when this StringId is logged to allow for reverse translation.
static StringId LITERAL
          A StringId to allow users to log a literal String using the LogWriterI18n
 
Constructor Summary
StringId(int id, String text)
          Gemstone internal constructor, customers have no need to create instances of this class.
 
Method Summary
 String getRawText()
          Accessor for the raw (unformatted) text of this StringId
static void setLocale(Locale l)
           
 String toLocalizedString()
           
 String toLocalizedString(Object... params)
          Substitutes parameter Objects into the text
 String toString()
           
 String toString(Object... params)
          Substitutes parameter Objects into the text
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

id

public final int id
A unique identifier that is written when this StringId is logged to allow for reverse translation.

See Also:
LogWriterImpl

LITERAL

public static final StringId LITERAL
A StringId to allow users to log a literal String using the LogWriterI18n

Constructor Detail

StringId

public StringId(int id,
                String text)
Gemstone internal constructor, customers have no need to create instances of this class.

Method Detail

setLocale

public static void setLocale(Locale l)

getRawText

public String getRawText()
Accessor for the raw (unformatted) text of this StringId

Returns:
unformated text

toString

public String toString()
Overrides:
toString in class Object
Returns:
the English translation of this StringId

toString

public String toString(Object... params)
Substitutes parameter Objects into the text

Returns:
the English translation of this StringId
See Also:
MessageFormat

toLocalizedString

public String toLocalizedString()
Returns:
the translation of this StringId based on the current Locale

toLocalizedString

public String toLocalizedString(Object... params)
Substitutes parameter Objects into the text

Returns:
the translation of this StringId based on the current Locale
See Also:
MessageFormat

GemFire 6.6.2

Copyright © 1997-2012 VMware, Inc. All rights reserved.