Class EscapeTextBuilderImpl

    • Constructor Detail

      • EscapeTextBuilderImpl

        public EscapeTextBuilderImpl​()
    • Method Detail

      • getEscapeTextMode

        public EscapeTextMode getEscapeTextMode​()
        Retrieves the escape text mode from the escape text mode property.
        Specified by:
        getEscapeTextMode in interface EscapeTextBuilder
        Returns:
        The escape text mode stored by the escape text mode property.
      • setEscapeTextMode

        public void setEscapeTextMode​(EscapeTextMode aEscapeTextMode)
        Sets the escape text mode for the escape text mode property.
        Specified by:
        setEscapeTextMode in interface EscapeTextBuilder
        Parameters:
        aEscapeTextMode - The escape text mode to be stored by the align text mode property.
      • getEscapeProperties

        public org.refcodes.structure.Property[] getEscapeProperties​()
        Gets the escape properties.
        Specified by:
        getEscapeProperties in interface EscapeTextBuilder
        Returns:
        the escape properties
      • setEscapeProperties

        public void setEscapeProperties​(org.refcodes.structure.Property... aProperties)
        Sets the escape properties.
        Specified by:
        setEscapeProperties in interface EscapeTextBuilder
        Parameters:
        aProperties - the new escape properties
      • addEscapeProperty

        public EscapeTextBuilder addEscapeProperty​(org.refcodes.structure.Property aProperty)
        Adds the escape property.
        Specified by:
        addEscapeProperty in interface EscapeTextBuilder
        Parameters:
        aProperty - the property
        Returns:
        the escape text builder
      • toEscaped

        protected String[] toEscaped​(String[] aText,
                                     List<org.refcodes.structure.Property> aProperties,
                                     EscapeTextMode aEscapeTextMode)
        To escaped.
        Parameters:
        aText - the text
        aProperties - the properties
        aEscapeTextMode - the escape text mode
        Returns:
        the string[]
      • toEscaped

        protected String toEscaped​(String aText,
                                   List<org.refcodes.structure.Property> aProperties,
                                   EscapeTextMode aEscapeTextMode)
        To escaped.
        Parameters:
        aText - the text
        aProperties - the properties
        aEscapeTextMode - the escape text mode
        Returns:
        the string
      • toEscaped

        public static String toEscaped​(String aUnEscaped,
                                       String[][] aEscapeMatrix)
        Escapes a text using the provided escape matrix which must be a two dimensional array with two elements per line and where the element at position 0 (of a line) represents the character and the element at position 1 (of a line) the escaped character.
        Parameters:
        aUnEscaped - The text to be escaped.
        aEscapeMatrix - The matrix to be used for escaping.
        Returns:
        The escape text as of the escape matrix.
      • toUnEscaped

        public static String toUnEscaped​(String aEscaped,
                                         String[][] aEscapeMatrix)
        Unescapes a text using the provided escape matrix which must be a two dimensional array with two elements per line and where the element at position 0 (of a line) represents the character and the element at position 1 (of a line) the escaped character.
        Parameters:
        aEscaped - The text to be unescaped.
        aEscapeMatrix - The matrix to be used for unescaping.
        Returns:
        The unescape text as of the escape matrix.
      • getText

        public String[] getText​()
        Retrieves the text from the text property.
        Specified by:
        getText in interface TextAccessor
        Returns:
        The text stored by the text property.
      • setText

        public void setText​(String... aText)
        Sets the text for the text property.
        Specified by:
        setText in interface TextAccessor.TextMutator
        Parameters:
        aText - The text to be stored by the text property.
      • toString

        public String toString​()
        The String being build by the builder upon the settings of the attributes. In case more then one line has been set as input and the functionality of the builder is applied to each line in separate, then this method returns all of them lines concatenated with a line break between each of them (implementation depended).
        Specified by:
        toString in interface TextAccessor.TextProvider
        Overrides:
        toString in class Object
        Returns:
        The according resulting String