Class UnicodeString
java.lang.Object
it.polimi.ingsw.client.cli_graphics.UnicodeString
This class represents a string composed by unicode characters.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionappendNonUnicodeString(String string) This method gets a String in input and appends it to this UnicodeString.appendUnicodeChar(String unicodeRepresentation) This method gets a character in input (represented as a String) and appends it to this UnicodeString.void/** This method gets a color in input (represented as a String) and modifies the color of this string accordingly.This method returns this UnicodeString.
-
Field Details
-
string
-
ANSI_RESET
- See Also:
-
-
Constructor Details
-
UnicodeString
public UnicodeString()
-
-
Method Details
-
appendNonUnicodeString
This method gets a String in input and appends it to this UnicodeString.- Parameters:
string- is the string that will be appended to this UnicodeString.- Returns:
- this, a UnicodeString made up with the previous UnicodeString and the newly added String.
-
appendUnicodeChar
This method gets a character in input (represented as a String) and appends it to this UnicodeString.- Parameters:
unicodeRepresentation- is the string representing the character with its color.- Returns:
- this, a UnicodeString made up with the previoys UnicodeString and the newly added character.
-
getUnicodeString
This method returns this UnicodeString.- Returns:
- an ArrayList representing the current string.
-
color
/** This method gets a color in input (represented as a String) and modifies the color of this string accordingly.- Parameters:
ansiColorCode- is the string representing the color that this string will be modified to.
-