Class LineElementsFactory

  • All Implemented Interfaces:
    ElementsFactory

    public class LineElementsFactory
    extends java.lang.Object
    implements ElementsFactory
    Implements an element factory that creates elements from the lines of an input text.
    • Method Detail

      • create

        public static LineElementsFactory create​(DocumentSource source,
                                                 java.lang.String text,
                                                 boolean ignoreWs)
        Create a new line element factory for the given text.
        Parameters:
        source - the document source
        text - the text
        ignoreWs - if true white spaces are ignored for the diff
        Returns:
        the new factory todo: create non-annotated variant
      • create

        public static LineElementsFactory create​(FileDocumentSource source,
                                                 boolean ignoreWs)
                                          throws java.io.IOException
        Create a new line element factory for the given source.
        Parameters:
        source - the file source
        ignoreWs - if true white spaces are ignored for the diff
        Returns:
        the new factory
        Throws:
        java.io.IOException - if an I/O error occurs
      • create

        public static LineElementsFactory create​(FileDocumentSource source,
                                                 boolean ignoreWs,
                                                 java.lang.String charset)
                                          throws java.io.IOException
        Create a new line element factory for the given source.
        Parameters:
        source - the file source
        ignoreWs - if true white spaces are ignored for the diff
        charset - the charset
        Returns:
        the new factory
        Throws:
        java.io.IOException - if an I/O error occurs todo: create non-annotated variant
      • create

        public static LineElementsFactory create​(DocumentSource source,
                                                 java.io.Reader text,
                                                 boolean ignoreWs)
                                          throws java.io.IOException
        Create a new line element factory for the given source.
        Parameters:
        source - the source
        text - the text
        ignoreWs - if true white spaces are ignored for the diff
        Returns:
        the new factory
        Throws:
        java.io.IOException - if an I/O error occurs todo: create non-annotated variant