Class Text


  • public class Text
    extends Object
    Helper class for working with InternationalString and other forms of Text.
    Author:
    Jody Garnett
    • Constructor Summary

      Constructors 
      Constructor Description
      Text()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static InternationalString text​(String english)
      Create a international string based on the provided English text.
      static InternationalString text​(String key, String resourceBundle)
      Create an international string based on provided key, and resource bundle.
      static InternationalString text​(String key, Map<String,​String> translations)  
      static InternationalString text​(String key, Properties properties)  
      • Methods inherited from class Object

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

      • Text

        public Text()
    • Method Detail

      • text

        public static InternationalString text​(String english)
        Create a international string based on the provided English text.

        We will hook up this method to a properties file at a later time, making other translations available via the Factory SPI mechanism.

        Returns:
        SimpleInternationalString
      • text

        public static InternationalString text​(String key,
                                               String resourceBundle)
        Create an international string based on provided key, and resource bundle.
        Parameters:
        key - The key for the resource to fetch
        resourceBundle - The name of the resource bundle, as a fully qualified class name.
        Returns:
        ResourceInternationalString
      • text

        public static InternationalString text​(String key,
                                               Map<String,​String> translations)