Class UnicodeString

java.lang.Object
it.polimi.ingsw.client.cli_graphics.UnicodeString

class UnicodeString extends Object
This class represents a string composed by unicode characters.
  • Field Details

  • Constructor Details

    • UnicodeString

      public UnicodeString()
  • Method Details

    • appendNonUnicodeString

      public UnicodeString appendNonUnicodeString(String string)
      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

      public UnicodeString appendUnicodeChar(String unicodeRepresentation)
      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

      public List<String> getUnicodeString()
      This method returns this UnicodeString.
      Returns:
      an ArrayList representing the current string.
    • color

      public void color(String ansiColorCode)
      /** 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.