Class AbstractInternationalString

    • Constructor Detail

      • AbstractInternationalString

        public AbstractInternationalString()
        Constructs an international string.
    • Method Detail

      • subSequence

        public CharSequence subSequence​(int start,
                                        int end)
        Returns a subsequence of the string in the default locale. The subsequence is a String object starting with the character value at the specified index and ending with the character value at index end - 1.
        Specified by:
        subSequence in interface CharSequence
        Parameters:
        start - The start index, inclusive.
        end - The end index, exclusive.
        Returns:
        The specified subsequence.
        Throws:
        IndexOutOfBoundsException - if start or end is out of range.
      • toString

        public abstract String toString​(Locale locale)
        Returns this string in the given locale. If no string is available in the given locale, then some default locale is used. The default locale is implementation-dependent. It may or may not be the system default).
        Specified by:
        toString in interface InternationalString
        Parameters:
        locale - The desired locale for the string to be returned, or null for a string in the implementation default locale.
        Returns:
        The string in the given locale if available, or in the default locale otherwise.
      • compareTo

        public int compareTo​(InternationalString object)
        Compares this string with the specified object for order. This method compare the string in the default locale, as returned by toString().
        Specified by:
        compareTo in interface Comparable<InternationalString>
        Parameters:
        object - The string to compare with this string.
        Returns:
        A negative number if this string is before the given string, a positive number if after, or 0 if equals.