Class ReplaceTextBuilderImpl

    • Constructor Detail

      • ReplaceTextBuilderImpl

        public ReplaceTextBuilderImpl​()
    • Method Detail

      • getReplaceText

        public java.lang.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​(java.lang.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 java.lang.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​(java.lang.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.
      • toStrings

        public java.lang.String[] toStrings​()
                                     throws java.lang.IllegalStateException
        The Strings being build by the builder upon the settings of the attributes.
        Specified by:
        toStrings in interface TextAccessor.TextProvider
        Returns:
        The according resulting String array
        Throws:
        java.lang.IllegalStateException
      • toReplaced

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

        protected static java.lang.String toReplaced​(java.lang.String aText,
                                                     java.lang.String aFindText,
                                                     java.lang.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​(java.lang.StringBuffer aTextBuffer,
                                        java.lang.String aFindText,
                                        java.lang.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 java.lang.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​(java.lang.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.
      • withText

        public B withText​(java.lang.String... aText)
        With text.
        Specified by:
        withText in interface Text<B extends Text<B>>
        Specified by:
        withText in interface TextAccessor.TextBuilder<B extends Text<B>>
        Parameters:
        aText - the text
        Returns:
        the b
      • withText

        public B withText​(java.util.Collection<java.lang.String> aText)
        With text.
        Specified by:
        withText in interface TextAccessor.TextBuilder<B extends Text<B>>
        Parameters:
        aText - the text
        Returns:
        the b
      • toString

        public java.lang.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 java.lang.Object
        Returns:
        The according resulting String