Package com.day.util.diff
Class LineElementsFactory
- java.lang.Object
-
- com.day.util.diff.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.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classLineElementsFactory.IStringElementAn element that is based on a string but ignores the whitespaces in the equals method.static classLineElementsFactory.StringElementAn element that is based on a string todo: create non-annotated varian
-
Field Summary
-
Fields inherited from interface com.day.util.diff.ElementsFactory
CVS_ID
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static LineElementsFactorycreate(DocumentSource source, java.io.Reader text, boolean ignoreWs)Create a new line element factory for the given source.static LineElementsFactorycreate(DocumentSource source, java.lang.String text, boolean ignoreWs)Create a new line element factory for the given text.static LineElementsFactorycreate(FileDocumentSource source, boolean ignoreWs)Deprecated.usecreate(FileDocumentSource, boolean, String)insteadstatic LineElementsFactorycreate(FileDocumentSource source, boolean ignoreWs, java.lang.String charset)Create a new line element factory for the given source.Document.Element[]getElements()Provides the elements
-
-
-
Method Detail
-
getElements
public Document.Element[] getElements()
Provides the elements- Specified by:
getElementsin interfaceElementsFactory- Returns:
- an array of elements
-
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 sourcetext- the textignoreWs- iftruewhite 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
Deprecated.usecreate(FileDocumentSource, boolean, String)insteadCreate a new line element factory for the given source.- Parameters:
source- the file sourceignoreWs- iftruewhite 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 sourceignoreWs- iftruewhite spaces are ignored for the diffcharset- 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 sourcetext- the textignoreWs- iftruewhite 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
-
-