Class ReplaceTextBuilderImpl

    • Constructor Detail

      • ReplaceTextBuilderImpl

        public ReplaceTextBuilderImpl​()
    • Method Detail

      • getReplaceText

        public String getReplaceText​()
        Retrieves the replace text from the replace text property.
        Specified by:
        getReplaceText in interface ReplaceTextBuilder
        Returns:
        The replace text stored by the replace text property.
      • setReplaceText

        public void setReplaceText​(String aReplaceText)
        Sets the replace text for the replace text property.
        Specified by:
        setReplaceText in interface ReplaceTextBuilder
        Parameters:
        aReplaceText - The replace text to be stored by the text align mode property.
      • getFindText

        public String getFindText​()
        Retrieves the find text from the find text property.
        Specified by:
        getFindText in interface ReplaceTextBuilder
        Returns:
        The find text stored by the find text property.
      • setFindText

        public void setFindText​(String aFindText)
        Sets the find text for the find text property.
        Specified by:
        setFindText in interface ReplaceTextBuilder
        Parameters:
        aFindText - The find text to be stored by the text align mode property.
      • toReplaced

        protected static String[] toReplaced​(String[] aText,
                                             String aFindText,
                                             String aReplaceText)
        To replaced.
        Parameters:
        aText - the text
        aFindText - the find text
        aReplaceText - the replace text
        Returns:
        the string[]
      • toReplaced

        protected static String toReplaced​(String aText,
                                           String aFindText,
                                           String aReplaceText)
        Replaces all occurrences of a find-String with a replace- String in a text and returns the find-and-replace String.
        Parameters:
        aText - The text to be processed ('find-and-replace').
        aFindText - The String to be searched and replaced.
        aReplaceText - The String which will replace the searched String.
        Returns:
        Description is currently not available!
      • toReplaced

        protected static int toReplaced​(StringBuffer aTextBuffer,
                                        String aFindText,
                                        String aReplaceText)
        Replaces a text by an other text in a StringBuffer.
        Parameters:
        aTextBuffer - The buffer containing text with keywords.
        aFindText - The text which has to be replaced.
        aReplaceText - The text that should be places over the original.
        Returns:
        The number of replacements done.
      • 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