Class LocalizedString


  • public class LocalizedString
    extends java.lang.Object
    The result of resolving a localized string.

    This struct contains the result (in UTF-8 encoding) of resolving a localized string, consisting of its value, its format (TextFormat.Plain or TextFormat.XHTML), and a success value indicating whether the string was successfully resolved.

    • Field Summary

      Fields 
      Modifier and Type Field Description
      TextFormat format
      The format that the resolved localized string is stored in (TextFormat.Plain or TextFormat.XHTML)
      boolean success
      Indicates whether resolving the string was successful.
      java.lang.String value
      The value of the resolved localized string.
    • Constructor Summary

      Constructors 
      Constructor Description
      LocalizedString()
      Constructor for an unsuccessful localized string result.
      LocalizedString​(java.lang.String v, TextFormat f)
      Constructor for a successful localized string result.
    • Method Summary

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • value

        public java.lang.String value
        The value of the resolved localized string.

        This value is UTF-8 encoded

      • success

        public boolean success
        Indicates whether resolving the string was successful.
    • Constructor Detail

      • LocalizedString

        public LocalizedString()
        Constructor for an unsuccessful localized string result.

        This constructor sets success to false.

      • LocalizedString

        public LocalizedString​(java.lang.String v,
                               TextFormat f)
        Constructor for a successful localized string result.

        Sets the value to the given string, and the format to the given format, and sets success to true.