Top Inners Fields Constructors Methods
com.ibm.icu.impl

public final Class CaseMapImpl

extends Object
Class Inheritance
Imports
java.io.IOException, java.text.CharacterIterator, java.util.Locale, com.ibm.icu.lang.UCharacter, .UCharacterCategory, com.ibm.icu.text.BreakIterator, .Edits, com.ibm.icu.util.ICUUncheckedIOException, .ULocale

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class
public static class
CaseMapImpl.StringContextIterator

Implementation of UCaseProps.ContextIterator, iterates over a String.

private static class

Field Summary

Modifier and TypeField and Description
private static final char
private static final Trie2_16
private static final int
public static final int
OMIT_UNCHANGED_TEXT

Omit unchanged text when case-mapping with Edits.

public static final int
private static final int
TITLECASE_ADJUSTMENT_MASK

Bit mask for the titlecasing index adjustment options bit set.

private static final int
TITLECASE_ITERATOR_MASK

Bit mask for the titlecasing iterator options bit field.

public static final int
public static final int
private static final int

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public static int
addTitleAdjustmentOption(int options, int newOption)

public static int
addTitleIteratorOption(int options, int newOption)

private static int
private static void
appendResult(int result, Appendable dest, int cpLength, int options, Edits edits)

Appends a full case mapping result, see UCaseProps#MAX_STRING_LENGTH.

private static final void
appendUnchanged(CharSequence src, int start, int length, Appendable dest, int options, Edits edits)

private static String
applyEdits(CharSequence src, StringBuilder replacementChars, Edits edits)

public static String
fold(int options, CharSequence src)

public static <A extends Appendable> A
fold(int options, CharSequence src, A dest, Edits edits)

public static BreakIterator
getTitleBreakIterator(Locale locale, int options, BreakIterator iter)

public static BreakIterator
getTitleBreakIterator(ULocale locale, int options, BreakIterator iter)

private static void
internalToLower(int caseLocale, int options, CharSequence src, int srcStart, int srcLimit, CaseMapImpl.StringContextIterator iter, Appendable dest, Edits edits)

caseLocale >= 0: Lowercases [srcStart..srcLimit[ but takes context [0..srcLength[ into account.

private static void
internalToUpper(int caseLocale, int options, CharSequence src, Appendable dest, Edits edits)

private static boolean
isLNS(int c)

private static <A extends Appendable> int

Returns:

the src index after the titlecased sequence, or the start index if no Dutch IJ
maybeTitleDutchIJ
(CharSequence src, int c, int start, int segmentLimit, A dest, int options, Edits edits)

Input: c is a letter I with or without acute accent.

public static String
toLower(int caseLocale, int options, CharSequence src)

public static <A extends Appendable> A
toLower(int caseLocale, int options, CharSequence src, A dest, Edits edits)

public static String
toTitle(int caseLocale, int options, BreakIterator iter, CharSequence src)

public static <A extends Appendable> A
toTitle(int caseLocale, int options, BreakIterator titleIter, CharSequence src, A dest, Edits edits)

public static String
toUpper(int caseLocale, int options, CharSequence src)

public static <A extends Appendable> A
toUpper(int caseLocale, int options, CharSequence src, A dest, Edits edits)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

ACUTEback to summary
private static final char ACUTE
CASE_TRIEback to summary
private static final Trie2_16 CASE_TRIE
LNSback to summary
private static final int LNS
OMIT_UNCHANGED_TEXTback to summary
public static final int OMIT_UNCHANGED_TEXT

Omit unchanged text when case-mapping with Edits.

TITLECASE_ADJUST_TO_CASEDback to summary
public static final int TITLECASE_ADJUST_TO_CASED
TITLECASE_ADJUSTMENT_MASKback to summary
private static final int TITLECASE_ADJUSTMENT_MASK

Bit mask for the titlecasing index adjustment options bit set. Currently two bits are defined: TITLECASE_NO_BREAK_ADJUSTMENT, TITLECASE_ADJUST_TO_CASED. See stringoptions.h.

ICU Status
Internal ICU component.
TITLECASE_ITERATOR_MASKback to summary
private static final int TITLECASE_ITERATOR_MASK

Bit mask for the titlecasing iterator options bit field. Currently only 3 out of 8 values are used: 0 (words), TITLECASE_WHOLE_STRING, TITLECASE_SENTENCES. See stringoptions.h.

ICU Status
Internal ICU component.
TITLECASE_SENTENCESback to summary
public static final int TITLECASE_SENTENCES
TITLECASE_WHOLE_STRINGback to summary
public static final int TITLECASE_WHOLE_STRING
U_GC_M_MASKback to summary
private static final int U_GC_M_MASK

Constructor Detail

CaseMapImplback to summary
public CaseMapImpl()

Method Detail

addTitleAdjustmentOptionback to summary
public static int addTitleAdjustmentOption(int options, int newOption)
addTitleIteratorOptionback to summary
public static int addTitleIteratorOption(int options, int newOption)
appendCodePointback to summary
private static int appendCodePoint(Appendable a, int c) throws IOException
appendResultback to summary
private static void appendResult(int result, Appendable dest, int cpLength, int options, Edits edits) throws IOException

Appends a full case mapping result, see UCaseProps#MAX_STRING_LENGTH.

appendUnchangedback to summary
private static final void appendUnchanged(CharSequence src, int start, int length, Appendable dest, int options, Edits edits) throws IOException
applyEditsback to summary
private static String applyEdits(CharSequence src, StringBuilder replacementChars, Edits edits)
foldback to summary
public static String fold(int options, CharSequence src)
foldback to summary
public static <A extends Appendable> A fold(int options, CharSequence src, A dest, Edits edits)
getTitleBreakIteratorback to summary
public static BreakIterator getTitleBreakIterator(Locale locale, int options, BreakIterator iter)
getTitleBreakIteratorback to summary
public static BreakIterator getTitleBreakIterator(ULocale locale, int options, BreakIterator iter)
internalToLowerback to summary
private static void internalToLower(int caseLocale, int options, CharSequence src, int srcStart, int srcLimit, CaseMapImpl.StringContextIterator iter, Appendable dest, Edits edits) throws IOException

caseLocale >= 0: Lowercases [srcStart..srcLimit[ but takes context [0..srcLength[ into account. caseLocale < 0: Case-folds [srcStart..srcLimit[.

internalToUpperback to summary
private static void internalToUpper(int caseLocale, int options, CharSequence src, Appendable dest, Edits edits) throws IOException
isLNSback to summary
private static boolean isLNS(int c)
maybeTitleDutchIJback to summary
private static <A extends Appendable> int maybeTitleDutchIJ(CharSequence src, int c, int start, int segmentLimit, A dest, int options, Edits edits) throws IOException

Input: c is a letter I with or without acute accent. start is the index in src after c, and is less than segmentLimit. If a plain i/I is followed by a plain j/J, or an i/I with acute (precomposed or decomposed) is followed by a j/J with acute, then we output accordingly.

Returns:int

the src index after the titlecased sequence, or the start index if no Dutch IJ

toLowerback to summary
public static String toLower(int caseLocale, int options, CharSequence src)
toLowerback to summary
public static <A extends Appendable> A toLower(int caseLocale, int options, CharSequence src, A dest, Edits edits)
toTitleback to summary
public static String toTitle(int caseLocale, int options, BreakIterator iter, CharSequence src)
toTitleback to summary
public static <A extends Appendable> A toTitle(int caseLocale, int options, BreakIterator titleIter, CharSequence src, A dest, Edits edits)
toUpperback to summary
public static String toUpper(int caseLocale, int options, CharSequence src)
toUpperback to summary
public static <A extends Appendable> A toUpper(int caseLocale, int options, CharSequence src, A dest, Edits edits)
com.ibm.icu.impl back to summary

private final Class CaseMapImpl.GreekUpper

extends Object
Class Inheritance

Field Summary

Modifier and TypeField and Description
private static final int
private static final int
private static final int
private static final char[]
private static final char[]
private static final char
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
private static final int
getDiacriticData(int c)

Returns a non-zero value for each of the Greek combining diacritics listed in The Unicode Standard, version 8, chapter 7.2 Greek, plus some perispomeni look-alikes.

private static final int
private static boolean
private static <A extends Appendable> A
toUpper(int options, CharSequence src, A dest, Edits edits)

Greek string uppercasing with a state machine.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

AFTER_CASEDback to summary
private static final int AFTER_CASED
AFTER_VOWEL_WITH_COMBINING_ACCENTback to summary
private static final int AFTER_VOWEL_WITH_COMBINING_ACCENT
AFTER_VOWEL_WITH_PRECOMPOSED_ACCENTback to summary
private static final int AFTER_VOWEL_WITH_PRECOMPOSED_ACCENT
data0370back to summary
private static final char[] data0370
data1F00back to summary
private static final char[] data1F00
data2126back to summary
private static final char data2126
HAS_ACCENTback to summary
private static final int HAS_ACCENT
HAS_COMBINING_DIALYTIKAback to summary
private static final int HAS_COMBINING_DIALYTIKA
HAS_DIALYTIKAback to summary
private static final int HAS_DIALYTIKA
HAS_EITHER_DIALYTIKAback to summary
private static final int HAS_EITHER_DIALYTIKA
HAS_OTHER_GREEK_DIACRITICback to summary
private static final int HAS_OTHER_GREEK_DIACRITIC
HAS_VOWELback to summary
private static final int HAS_VOWEL
HAS_VOWEL_AND_ACCENTback to summary
private static final int HAS_VOWEL_AND_ACCENT
HAS_VOWEL_AND_ACCENT_AND_DIALYTIKAback to summary
private static final int HAS_VOWEL_AND_ACCENT_AND_DIALYTIKA
HAS_YPOGEGRAMMENIback to summary
private static final int HAS_YPOGEGRAMMENI
UPPER_MASKback to summary
private static final int UPPER_MASK

Constructor Detail

GreekUpperback to summary
private GreekUpper()

Method Detail

getDiacriticDataback to summary
private static final int getDiacriticData(int c)

Returns a non-zero value for each of the Greek combining diacritics listed in The Unicode Standard, version 8, chapter 7.2 Greek, plus some perispomeni look-alikes.

getLetterDataback to summary
private static final int getLetterData(int c)
isFollowedByCasedLetterback to summary
private static boolean isFollowedByCasedLetter(CharSequence s, int i)
toUpperback to summary
private static <A extends Appendable> A toUpper(int options, CharSequence src, A dest, Edits edits) throws IOException

Greek string uppercasing with a state machine. Probably simpler than a stateless function that has to figure out complex context-before for each character.

Todo

Try to re-consolidate one way or another with the non-Greek function.

Keep this consistent with the C++ versions in ustrcase.cpp (UTF-16) and ucasemap.cpp (UTF-8).

com.ibm.icu.impl back to summary

public final Class CaseMapImpl.StringContextIterator

extends Object
implements ContextIterator
Class Inheritance
All Implemented Interfaces
com.ibm.icu.impl.UCaseProps.ContextIterator

Implementation of UCaseProps.ContextIterator, iterates over a String. See ustrcase.c/utf16_caseContextIterator().

Field Summary

Modifier and TypeField and Description
protected int
protected int
protected int
protected int
protected int
protected CharSequence
s

Constructor Summary

AccessConstructor and Description
public
StringContextIterator(CharSequence
String to iterate over.
src
)

Constructor.

public
StringContextIterator(CharSequence
String to iterate over.
src
,
int
Start index of the current code point.
cpStart
,
int
Limit index of the current code point.
cpLimit
)

Constructor.

Method Summary

Modifier and TypeMethod and Description
public int
public int
getCPLimit()

Returns the limit of the code point that was last returned by nextCaseMapCP().

public int
getCPStart()

Returns the start of the code point that was last returned by nextCaseMapCP().

public void
moveTo(int i)

public void
moveToLimit()

Move to the iteration limit without fetching code points up to there.

public int
next()

Implements com.ibm.icu.impl.UCaseProps.ContextIterator.next.

Iterate and return the next code point, moving in the direction determined by the reset() call.
public int

Returns:

The next code point to be case-mapped, or <0 when the iteration is done.
nextCaseMapCP
()

Iterate forward through the string to fetch the next code point to be case-mapped, and set the context indexes for it.

public void
reset(int
>0: Begin iterating forward from the first code point after the one that is being case-mapped. <0: Begin iterating backward from the first code point before the one that is being case-mapped.
direction
)

Implements com.ibm.icu.impl.UCaseProps.ContextIterator.reset.

Reset the iterator for forward or backward iteration.
public void
setCPStartAndLimit(int s, int l)

public void
setLimit(int
The iteration limit.
lim
)

Set the iteration limit for nextCaseMapCP() to an index within the string.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

cpLimitback to summary
protected int cpLimit
cpStartback to summary
protected int cpStart
dirback to summary
protected int dir
indexback to summary
protected int index
limitback to summary
protected int limit
sback to summary
protected CharSequence s

Constructor Detail

StringContextIteratorback to summary
public StringContextIterator(CharSequence src)

Constructor.

Parameters
src:CharSequence

String to iterate over.

StringContextIteratorback to summary
public StringContextIterator(CharSequence src, int cpStart, int cpLimit)

Constructor.

Parameters
src:CharSequence

String to iterate over.

cpStart:int

Start index of the current code point.

cpLimit:int

Limit index of the current code point.

Method Detail

getCPLengthback to summary
public int getCPLength()
getCPLimitback to summary
public int getCPLimit()

Returns the limit of the code point that was last returned by nextCaseMapCP().

getCPStartback to summary
public int getCPStart()

Returns the start of the code point that was last returned by nextCaseMapCP().

moveToback to summary
public void moveTo(int i)
moveToLimitback to summary
public void moveToLimit()

Move to the iteration limit without fetching code points up to there.

nextback to summary
public int next()

Implements com.ibm.icu.impl.UCaseProps.ContextIterator.next.

Doc from com.ibm.icu.impl.UCaseProps.ContextIterator.next.

Iterate and return the next code point, moving in the direction determined by the reset() call.

Returns:int

Next code point, or <0 when the iteration is done.

Annotations
@Override
nextCaseMapCPback to summary
public int nextCaseMapCP()

Iterate forward through the string to fetch the next code point to be case-mapped, and set the context indexes for it.

When the iteration limit is reached (and -1 is returned), getCPStart() will be at the iteration limit.

Iteration with next() does not affect the position for nextCaseMapCP().

Returns:int

The next code point to be case-mapped, or <0 when the iteration is done.

resetback to summary
public void reset(int direction)

Implements com.ibm.icu.impl.UCaseProps.ContextIterator.reset.

Doc from com.ibm.icu.impl.UCaseProps.ContextIterator.reset.

Reset the iterator for forward or backward iteration.

Parameters
direction:int

>0: Begin iterating forward from the first code point after the one that is being case-mapped. <0: Begin iterating backward from the first code point before the one that is being case-mapped.

Annotations
@Override
setCPStartAndLimitback to summary
public void setCPStartAndLimit(int s, int l)
setLimitback to summary
public void setLimit(int lim)

Set the iteration limit for nextCaseMapCP() to an index within the string. If the limit parameter is negative or past the string, then the string length is restored as the iteration limit.

This limit does not affect the next() function which always iterates to the very end of the string.

Parameters
lim:int

The iteration limit.

com.ibm.icu.impl back to summary

private final Class CaseMapImpl.WholeStringBreakIterator

extends BreakIterator
Class Inheritance

Field Summary

Modifier and TypeField and Description
private int
Inherited from com.ibm.icu.text.BreakIterator:
DONEKIND_CHARACTERKIND_LINEKIND_SENTENCEKIND_TITLEKIND_WORDWORD_IDEOWORD_IDEO_LIMITWORD_KANAWORD_KANA_LIMITWORD_LETTERWORD_LETTER_LIMITWORD_NONEWORD_NONE_LIMITWORD_NUMBERWORD_NUMBER_LIMIT

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public int
current()

Implements abstract com.ibm.icu.text.BreakIterator.current.

Return the iterator's current position.
public int
first()

Implements abstract com.ibm.icu.text.BreakIterator.first.

Set the iterator to the first boundary position.
public int
following(int
The character position to start searching from.
offset
)

Implements abstract com.ibm.icu.text.BreakIterator.following.

Sets the iterator's current iteration position to be the first boundary position following the specified position.
public CharacterIterator
getText()

Implements abstract com.ibm.icu.text.BreakIterator.getText.

Returns a CharacterIterator over the text being analyzed.
public int
last()

Implements abstract com.ibm.icu.text.BreakIterator.last.

Set the iterator to the last boundary position.
public int
next(int
The number of boundaries to advance over (if positive, moves forward; if negative, moves backwards).
n
)

Implements abstract com.ibm.icu.text.BreakIterator.next.

Move the iterator by the specified number of steps in the text.
public int
next()

Implements abstract com.ibm.icu.text.BreakIterator.next.

Advances the iterator forward one boundary.
private static void
public int
previous()

Implements abstract com.ibm.icu.text.BreakIterator.previous.

Move the iterator backward one boundary.
public void
setText(CharacterIterator
A CharacterIterator referring to the text to analyze with this BreakIterator (the iterator's current position is ignored, but its other state is significant).
newText
)

Implements abstract com.ibm.icu.text.BreakIterator.setText.

Sets the iterator to analyze a new piece of text.
public void
setText(CharSequence
A CharSequence containing the text to analyze with this BreakIterator.
newText
)

Overrides com.ibm.icu.text.BreakIterator.setText.

Sets the iterator to analyze a new piece of text.
public void
setText(String
A String containing the text to analyze with this BreakIterator.
newText
)

Overrides com.ibm.icu.text.BreakIterator.setText.

Sets the iterator to analyze a new piece of text.
Inherited from com.ibm.icu.text.BreakIterator:
clonegetAvailableLocalesgetAvailableULocalesgetBreakInstancegetCharacterInstancegetCharacterInstancegetCharacterInstancegetLineInstancegetLineInstancegetLineInstancegetLocalegetRuleStatusgetRuleStatusVecgetSentenceInstancegetSentenceInstancegetSentenceInstancegetTitleInstancegetTitleInstancegetTitleInstancegetWordInstancegetWordInstancegetWordInstanceisBoundaryprecedingregisterInstanceregisterInstanceunregister

Field Detail

lengthback to summary
private int length

Constructor Detail

WholeStringBreakIteratorback to summary
private WholeStringBreakIterator()

Method Detail

currentback to summary
public int current()

Implements abstract com.ibm.icu.text.BreakIterator.current.

Doc from com.ibm.icu.text.BreakIterator.current.

Return the iterator's current position.

Returns:int

The iterator's current position.

Annotations
@Override
firstback to summary
public int first()

Implements abstract com.ibm.icu.text.BreakIterator.first.

Doc from com.ibm.icu.text.BreakIterator.first.

Set the iterator to the first boundary position. This is always the beginning index of the text this iterator iterates over. For example, if the iterator iterates over a whole string, this function will always return 0.

Returns:int

The character offset of the beginning of the stretch of text being broken.

Annotations
@Override
followingback to summary
public int following(int offset)

Implements abstract com.ibm.icu.text.BreakIterator.following.

Doc from com.ibm.icu.text.BreakIterator.following.

Sets the iterator's current iteration position to be the first boundary position following the specified position. (Whether the specified position is itself a boundary position or not doesn't matter-- this function always moves the iteration position to the first boundary after the specified position.) If the specified position is the past-the-end position, returns DONE.

Parameters
offset:int

The character position to start searching from.

Returns:int

The position of the first boundary position following "offset" (whether or not "offset" itself is a boundary position), or DONE if "offset" is the past-the-end offset.

Annotations
@Override
getTextback to summary
public CharacterIterator getText()

Implements abstract com.ibm.icu.text.BreakIterator.getText.

Doc from com.ibm.icu.text.BreakIterator.getText.

Returns a CharacterIterator over the text being analyzed.

Caution

The state of the returned CharacterIterator must not be modified in any way while the BreakIterator is still in use. Doing so will lead to undefined behavior of the BreakIterator. Clone the returned CharacterIterator first and work with that.

The returned CharacterIterator is a reference to the actual iterator being used by the BreakIterator. No guarantees are made about the current position of this iterator when it is returned; it may differ from the BreakIterators current position. If you need to move that position to examine the text, clone this function's return value first.

Returns:CharacterIterator

A CharacterIterator over the text being analyzed.

Annotations
@Override
lastback to summary
public int last()

Implements abstract com.ibm.icu.text.BreakIterator.last.

Doc from com.ibm.icu.text.BreakIterator.last.

Set the iterator to the last boundary position. This is always the "past-the-end" index of the text this iterator iterates over. For example, if the iterator iterates over a whole string (call it "text"), this function will always return text.length().

Returns:int

The character offset of the end of the stretch of text being broken.

Annotations
@Override
nextback to summary
public int next(int n)

Implements abstract com.ibm.icu.text.BreakIterator.next.

Doc from com.ibm.icu.text.BreakIterator.next.

Move the iterator by the specified number of steps in the text. A positive number moves the iterator forward; a negative number moves the iterator backwards. If this causes the iterator to move off either end of the text, this function returns DONE; otherwise, this function returns the position of the appropriate boundary. Calling this function is equivalent to calling next() or previous() n times.

Parameters
n:int

The number of boundaries to advance over (if positive, moves forward; if negative, moves backwards).

Returns:int

The position of the boundary n boundaries from the current iteration position, or DONE if moving n boundaries causes the iterator to advance off either end of the text.

Annotations
@Override
nextback to summary
public int next()

Implements abstract com.ibm.icu.text.BreakIterator.next.

Doc from com.ibm.icu.text.BreakIterator.next.

Advances the iterator forward one boundary. The current iteration position is updated to point to the next boundary position after the current position, and this is also the value that is returned. If the current position is equal to the value returned by last(), or to DONE, this function returns DONE and sets the current position to DONE.

Returns:int

The position of the first boundary position following the iteration position.

Annotations
@Override
notImplementedback to summary
private static void notImplemented()
previousback to summary
public int previous()

Implements abstract com.ibm.icu.text.BreakIterator.previous.

Doc from com.ibm.icu.text.BreakIterator.previous.

Move the iterator backward one boundary. The current iteration position is updated to point to the last boundary position before the current position, and this is also the value that is returned. If the current position is equal to the value returned by first(), or to DONE, this function returns DONE and sets the current position to DONE.

Returns:int

The position of the last boundary position preceding the iteration position.

Annotations
@Override
setTextback to summary
public void setText(CharacterIterator newText)

Implements abstract com.ibm.icu.text.BreakIterator.setText.

Doc from com.ibm.icu.text.BreakIterator.setText.

Sets the iterator to analyze a new piece of text. This function resets the current iteration position to the beginning of the text. (The old iterator is dropped.)

Caution

The supplied CharacterIterator is used directly by the BreakIterator, and must not be altered in any way by code outside of the BreakIterator. Doing so will lead to undefined behavior of the BreakIterator.

Parameters
newText:CharacterIterator

A CharacterIterator referring to the text to analyze with this BreakIterator (the iterator's current position is ignored, but its other state is significant).

Annotations
@Override
setTextback to summary
public void setText(CharSequence newText)

Overrides com.ibm.icu.text.BreakIterator.setText.

Doc from com.ibm.icu.text.BreakIterator.setText.

Sets the iterator to analyze a new piece of text. The new piece of text is passed in as a CharSequence, and the current iteration position is reset to the beginning of the text. (The old text is dropped.)

The text underlying the CharSequence must not be be modified while the BreakIterator holds a references to it. (As could possibly occur with a StringBuilder, for example).

Parameters
newText:CharSequence

A CharSequence containing the text to analyze with this BreakIterator.

Annotations
@Override
setTextback to summary
public void setText(String newText)

Overrides com.ibm.icu.text.BreakIterator.setText.

Doc from com.ibm.icu.text.BreakIterator.setText.

Sets the iterator to analyze a new piece of text. The new piece of text is passed in as a String, and the current iteration position is reset to the beginning of the string. (The old text is dropped.)

Parameters
newText:String

A String containing the text to analyze with this BreakIterator.

Annotations
@Override