Package org.nuclos.api.l10n
Class DoNotTranslate
java.lang.Object
org.nuclos.api.l10n.DoNotTranslate
- All Implemented Interfaces:
- CharSequence
A wrapper class for strings that should not be translated by the localization system.
 This class marks strings to be excluded from the translation process.
 It implements CharSequence to maintain compatibility with string operations.
- 
Constructor SummaryConstructorsConstructorDescriptionCreates a new DoNotTranslate instance with the specified string.
- 
Method SummaryModifier and TypeMethodDescriptioncharcharAt(int index) Returns the character at the specified index in the wrapped string.intlength()Returns the length of the wrapped string.subSequence(int start, int end) Returns a new DoNotTranslate instance that contains a subsequence of the wrapped string.toString()Returns the wrapped string.Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.CharSequencechars, codePoints, isEmpty
- 
Constructor Details- 
DoNotTranslateCreates a new DoNotTranslate instance with the specified string.- Parameters:
- s- The string that should not be translated
- Throws:
- IllegalArgumentException- If the provided string is null
 
 
- 
- 
Method Details- 
lengthpublic int length()Returns the length of the wrapped string.- Specified by:
- lengthin interface- CharSequence
- Returns:
- The length of the wrapped string
 
- 
charAtpublic char charAt(int index) Returns the character at the specified index in the wrapped string.- Specified by:
- charAtin interface- CharSequence
- Parameters:
- index- The index of the character to return
- Returns:
- The character at the specified index
 
- 
subSequenceReturns a new DoNotTranslate instance that contains a subsequence of the wrapped string.- Specified by:
- subSequencein interface- CharSequence
- Parameters:
- start- The start index, inclusive
- end- The end index, exclusive
- Returns:
- A new DoNotTranslate instance containing the specified subsequence
 
- 
toStringReturns the wrapped string.- Specified by:
- toStringin interface- CharSequence
- Overrides:
- toStringin class- Object
- Returns:
- The string that is not to be translated
 
 
-