Class SimpleInternationalString

Object
AbstractInternationalString
SimpleInternationalString
All Implemented Interfaces:
Serializable, Char­Sequence, Comparable<International­String>, Formattable, International­String

public class SimpleInternationalString extends AbstractInternationalString implements Serializable
An international string consisting of a single string for all locales. For such a particular case, this implementation is more effective than other implementations provided in this package.

Instantiation

If the characters sequence to wrap is known to be a String instance, then the Simple­International­String(String) constructor is okay. Otherwise use the Types​.to­International­String(Char­Sequence) method.

Immutability and thread safety

This class is immutable and thus inherently thread-safe. Subclasses may or may not be immutable, at implementation choice. But implementers are encouraged to make sure that subclasses remain immutable for more predictable behavior.
Since:
1.1
See Also:
  • Constructor Details

    • SimpleInternationalString

      public SimpleInternationalString(String text)
      Creates a new instance from the given string. If the type of the text to wrap is the more generic Char­Sequence interface, then use the Types​.to­International­String(Char­Sequence) method instead.
      Parameters:
      text - the string for all locales.
  • Method Details