Class AbstractTextType<T extends AbstractTextType<T>>
java.lang.Object
de.espirit.firstspirit.common.text.AbstractTextType<T>
- All Implemented Interfaces:
ValueOfContractor
,Serializable
,CharSequence
,Comparable<T>
- Direct Known Subclasses:
Classname
,Designator
,GomButtonScriptReference
,LanguageAbbreviation
,ReferenceName
public abstract class AbstractTextType<T extends AbstractTextType<T>>
extends Object
implements CharSequence, Comparable<T>, Serializable, ValueOfContractor
Generic class for defining String-Facades.
- Since:
- 5.2.210803
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface de.espirit.common.text.ValueOfContractor
ValueOfContractor.Invoke
-
Constructor Summary
ModifierConstructorDescriptionprotected
AbstractTextType
(@NotNull String text) Construct an abstract text type. -
Method Summary
Modifier and TypeMethodDescriptionchar
charAt
(int index) Delegates toString.charAt(int)
.int
codePointAt
(int index) Delegates toString.codePointAt(int)
.int
codePointBefore
(int index) Delegates toString.codePointBefore(int)
.int
codePointCount
(int beginIndex, int endIndex) Delegates toString.codePointCount(int, int)
.int
Delegates toString.compareTo(String)
.int
int
Delegates toString.compareToIgnoreCase(String)
.Delegates toString.concat(String)
.boolean
Delegates toString.contains(CharSequence)
.boolean
Delegates toString.contentEquals(CharSequence)
.boolean
Delegates toString.contentEquals(StringBuffer)
.boolean
correlatesTo
(String string) Checks, if the given String correlates to this object's text.boolean
Delegates toString.endsWith(String)
.boolean
boolean
equalsIgnoreCase
(String anotherString) Delegates toString.equalsIgnoreCase(String)
.byte[]
getBytes()
Delegates toString.getBytes()
.void
getBytes
(int srcBegin, int srcEnd, byte[] dst, int dstBegin) Delegates toString.getBytes(int, int, byte[], int)
.byte[]
Delegates toString.getBytes(String)
.void
getChars
(int srcBegin, int srcEnd, char[] dst, int dstBegin) Delegates toString.getChars(int, int, char[], int)
.int
hashCode()
int
indexOf
(int ch) Delegates toString.indexOf(int)
.int
indexOf
(int ch, int fromIndex) Delegates toString.indexOf(int, int)
.int
Delegates toString.indexOf(String)
.int
Delegates toString.indexOf(String, int)
.intern()
Delegates toString.intern()
.int
lastIndexOf
(int ch) Delegates toString.lastIndexOf(int)
.int
lastIndexOf
(int ch, int fromIndex) Delegates toString.lastIndexOf(int, int)
.int
lastIndexOf
(String str) Delegates toString.lastIndexOf(String)
.int
lastIndexOf
(String str, int fromIndex) Delegates toString.lastIndexOf(String, int)
.int
length()
Delegates toString.length()
.boolean
Delegates toString.matches(String)
.int
offsetByCodePoints
(int index, int codePointOffset) Delegates toString.offsetByCodePoints(int, int)
.boolean
regionMatches
(boolean ignoreCase, int toffset, String other, int ooffset, int len) Delegates toString.regionMatches(boolean, int, String, int, int)
.boolean
regionMatches
(int toffset, String other, int ooffset, int len) Delegates toString.regionMatches(int, String, int, int)
.replace
(char oldChar, char newChar) Delegates toString.replace(char, char)
.replace
(CharSequence target, CharSequence replacement) Delegates toString.replace(CharSequence, CharSequence)
.replaceAll
(String regex, String replacement) Delegates toString.replaceAll(String, String)
.replaceFirst
(String regex, String replacement) Delegates toString.replaceFirst(String, String)
.String[]
Delegates toString.split(String)
.String[]
Delegates toString.split(String, int)
.boolean
startsWith
(String prefix) Delegates toString.startsWith(String)
.boolean
startsWith
(String prefix, int toffset) Delegates toString.startsWith(String, int)
.subSequence
(int beginIndex, int endIndex) Delegates toString.subSequence(int, int)
.substring
(int beginIndex) Delegates toString.substring(int)
.substring
(int beginIndex, int endIndex) Delegates toString.substring(int, int)
.char[]
Delegates toString.toCharArray()
.Delegates toString.toLowerCase()
.toLowerCase
(Locale locale) Delegates toString.toLowerCase(Locale)
.toString()
Delegates toString.toUpperCase()
.toUpperCase
(Locale locale) Delegates toString.toUpperCase(Locale)
.trim()
Delegates toString.trim()
.static AbstractTextType<?>
Create an instance from String.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.lang.CharSequence
chars, codePoints, isEmpty
-
Constructor Details
-
AbstractTextType
Construct an abstract text type. The given text must not benull
!- Parameters:
text
- The non-null text.- Throws:
NullPointerException
- If the text is null.- Since:
- 5.2.210803
-
-
Method Details
-
correlatesTo
Checks, if the given String correlates to this object's text.- Parameters:
string
- The string to test.- Returns:
true
, iff the held text equals the given object, ignoring cases.- Since:
- 5.2.210803
-
compareTo
- Specified by:
compareTo
in interfaceComparable<T extends AbstractTextType<T>>
- Since:
- 5.2.210803
-
valueOf
Create an instance from String.Note: The implementation at abstract level forces subclasses to fulfill the
ValueOfContractor
marker. If a subclass does not hide this method, aMustImplementError
is thrown.- Parameters:
string
- The string to create from.- Returns:
- The created instance or
null
, iff the given string is null. - Throws:
IllegalArgumentException
- If the given string does not match basic criteria for being a language abbreviation.- Since:
- 5.2.210803
-
charAt
public char charAt(int index) Delegates toString.charAt(int)
.- Specified by:
charAt
in interfaceCharSequence
- Since:
- 5.2.210803
-
codePointAt
public int codePointAt(int index) Delegates toString.codePointAt(int)
.- Since:
- 5.2.210803
-
codePointBefore
public int codePointBefore(int index) Delegates toString.codePointBefore(int)
.- Since:
- 5.2.210803
-
codePointCount
public int codePointCount(int beginIndex, int endIndex) Delegates toString.codePointCount(int, int)
.- Since:
- 5.2.210803
-
compareTo
Delegates toString.compareTo(String)
.- Since:
- 5.2.210803
-
compareToIgnoreCase
Delegates toString.compareToIgnoreCase(String)
.- Since:
- 5.2.210803
-
concat
Delegates toString.concat(String)
.- Since:
- 5.2.210803
-
contains
Delegates toString.contains(CharSequence)
.- Since:
- 5.2.210803
-
contentEquals
Delegates toString.contentEquals(CharSequence)
.- Since:
- 5.2.210803
-
contentEquals
Delegates toString.contentEquals(StringBuffer)
.- Since:
- 5.2.210803
-
endsWith
Delegates toString.endsWith(String)
.- Since:
- 5.2.210803
-
equals
-
equalsIgnoreCase
Delegates toString.equalsIgnoreCase(String)
.- Since:
- 5.2.210803
-
getBytes
public byte[] getBytes()Delegates toString.getBytes()
.- Since:
- 5.2.210803
-
getBytes
public void getBytes(int srcBegin, int srcEnd, byte[] dst, int dstBegin) Delegates toString.getBytes(int, int, byte[], int)
.- Since:
- 5.2.210803
-
getBytes
Delegates toString.getBytes(String)
.- Throws:
UnsupportedEncodingException
- Since:
- 5.2.210803
-
getChars
public void getChars(int srcBegin, int srcEnd, char[] dst, int dstBegin) Delegates toString.getChars(int, int, char[], int)
.- Since:
- 5.2.210803
-
hashCode
public int hashCode() -
indexOf
public int indexOf(int ch, int fromIndex) Delegates toString.indexOf(int, int)
.- Since:
- 5.2.210803
-
indexOf
public int indexOf(int ch) Delegates toString.indexOf(int)
.- Since:
- 5.2.210803
-
indexOf
Delegates toString.indexOf(String, int)
.- Since:
- 5.2.210803
-
indexOf
Delegates toString.indexOf(String)
.- Since:
- 5.2.210803
-
intern
Delegates toString.intern()
.- Since:
- 5.2.210803
-
lastIndexOf
public int lastIndexOf(int ch, int fromIndex) Delegates toString.lastIndexOf(int, int)
.- Since:
- 5.2.210803
-
lastIndexOf
public int lastIndexOf(int ch) Delegates toString.lastIndexOf(int)
.- Since:
- 5.2.210803
-
lastIndexOf
Delegates toString.lastIndexOf(String, int)
.- Since:
- 5.2.210803
-
lastIndexOf
Delegates toString.lastIndexOf(String)
.- Since:
- 5.2.210803
-
length
public int length()Delegates toString.length()
.- Specified by:
length
in interfaceCharSequence
- Since:
- 5.2.210803
-
matches
Delegates toString.matches(String)
.- Since:
- 5.2.210803
-
offsetByCodePoints
public int offsetByCodePoints(int index, int codePointOffset) Delegates toString.offsetByCodePoints(int, int)
.- Since:
- 5.2.210803
-
regionMatches
Delegates toString.regionMatches(boolean, int, String, int, int)
.- Since:
- 5.2.210803
-
regionMatches
Delegates toString.regionMatches(int, String, int, int)
.- Since:
- 5.2.210803
-
replace
Delegates toString.replace(char, char)
.- Since:
- 5.2.210803
-
replace
Delegates toString.replace(CharSequence, CharSequence)
.- Since:
- 5.2.210803
-
replaceAll
Delegates toString.replaceAll(String, String)
.- Since:
- 5.2.210803
-
replaceFirst
Delegates toString.replaceFirst(String, String)
.- Since:
- 5.2.210803
-
split
Delegates toString.split(String, int)
.- Since:
- 5.2.210803
-
split
Delegates toString.split(String)
.- Since:
- 5.2.210803
-
startsWith
Delegates toString.startsWith(String, int)
.- Since:
- 5.2.210803
-
startsWith
Delegates toString.startsWith(String)
.- Since:
- 5.2.210803
-
subSequence
Delegates toString.subSequence(int, int)
.- Specified by:
subSequence
in interfaceCharSequence
- Since:
- 5.2.210803
-
substring
Delegates toString.substring(int, int)
.- Since:
- 5.2.210803
-
substring
Delegates toString.substring(int)
.- Since:
- 5.2.210803
-
toCharArray
public char[] toCharArray()Delegates toString.toCharArray()
.- Since:
- 5.2.210803
-
toLowerCase
Delegates toString.toLowerCase()
.- Since:
- 5.2.210803
-
toLowerCase
Delegates toString.toLowerCase(Locale)
.- Since:
- 5.2.210803
-
toString
- Specified by:
toString
in interfaceCharSequence
- Overrides:
toString
in classObject
-
toUpperCase
Delegates toString.toUpperCase()
.- Since:
- 5.2.210803
-
toUpperCase
Delegates toString.toUpperCase(Locale)
.- Since:
- 5.2.210803
-
trim
Delegates toString.trim()
.- Since:
- 5.2.210803
-