Class RegExReplaceInfo


  • class RegExReplaceInfo
    extends java.lang.Object
    Information on how to implement a regular expression "replace" operation.
    Version:
    1.0
    • Constructor Summary

      Constructors 
      Constructor Description
      RegExReplaceInfo​(java.lang.String matchedText, int start, int end, java.lang.String replacement)
      Constructor.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int getEndIndex()
      Returns the end index of the matched text.
      java.lang.String getMatchedText()
      Returns the text that matched the regular expression.
      java.lang.String getReplacement()
      Returns the string to replace the matched text with.
      int getStartIndex()
      Returns the start index of the matched text.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • matchedText

        private java.lang.String matchedText
      • startIndex

        private int startIndex
      • endIndex

        private int endIndex
      • replacement

        private java.lang.String replacement
    • Constructor Detail

      • RegExReplaceInfo

        RegExReplaceInfo​(java.lang.String matchedText,
                         int start,
                         int end,
                         java.lang.String replacement)
        Constructor.
        Parameters:
        matchedText - The text that matched the regular expression.
        start - The start index of the matched text in the CharSequence searched.
        end - The end index of the matched text in the CharSequence searched.
        replacement - The text to replace the matched text with. This string has any matched groups and character escapes replaced.
    • Method Detail

      • getEndIndex

        public int getEndIndex()
        Returns the end index of the matched text.
        Returns:
        The end index of the matched text in the document searched.
        See Also:
        getMatchedText(), getEndIndex()
      • getMatchedText

        public java.lang.String getMatchedText()
        Returns the text that matched the regular expression.
        Returns:
        The matched text.
      • getReplacement

        public java.lang.String getReplacement()
        Returns the string to replace the matched text with.
        Returns:
        The string to replace the matched text with.
      • getStartIndex

        public int getStartIndex()
        Returns the start index of the matched text.
        Returns:
        The start index of the matched text in the document searched.
        See Also:
        getMatchedText(), getEndIndex()