change
objects which form an edit script. The objects compared are traditionally lines of text from two files. Comparison options such as "ignore whitespace" are implemented by modifying the equals
and hashcode
methods for the objects compared. The basic algorithm is described in: "An O(ND) Difference Algorithm and its Variations", Eugene Myers, Algorithmica Vol. 1 No. 2, 1986, p 251.
This class outputs different results from GNU diff 1.15 on some inputs. Our results are actually better (smaller change list, smaller total size of changes), but it would be nice to know why. Perhaps there is a memory overwrite bug in GNU diff 1.15. @author Stuart D. Gathman, translated from GNU diff 1.15 Copyright (C) 2000Business Management Systems, Inc.
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 1, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
change
objects which form an edit script. The objects compared are traditionally lines of text from two files. Comparison options such as "ignore whitespace" are implemented by modifying the equals
and hashcode
methods for the objects compared. The basic algorithm is described in: "An O(ND) Difference Algorithm and its Variations", Eugene Myers, Algorithmica Vol. 1 No. 2, 1986, p 251.
This class outputs different results from GNU diff 1.15 on some inputs. Our results are actually better (smaller change list, smaller total size of changes), but it would be nice to know why. Perhaps there is a memory overwrite bug in GNU diff 1.15. @author Stuart D. Gathman, translated from GNU diff 1.15Copyright (C) 2000 Business Management Systems, Inc.
This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 1, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
Within this library, the word text means a unit of information subject to version control.
Text is represented as Object[]
because the diff engine is capable of handling more than plain ascci. In fact, arrays of any type that implements {@link java.lang.Object#hashCode hashCode()} and{@link java.lang.Object#equals equals()}correctly can be subject to differencing using this library.
This library provides a framework in which different differencing algorithms may be used. If no algorithm is specififed, a default algorithm is used.
@version $Revision: 1.16 $ $Date: 2003/10/13 08:00:24 $ @author Juanco Anez @see Delta @see DiffAlgorithm modifications: 27 Apr 2003 bwm Added some comments whilst trying to figure out the algorithm 03 May 2003 bwm Factored out the algorithm implementation into a separate difference algorithm class to allow pluggable algorithms.Diff
...
Within this library, the word text means a unit of information subject to version control.
Text is represented as Object[]
because the diff engine is capable of handling more than plain ascci. In fact, arrays of any type that implements {@link java.lang.Object#hashCode hashCode()} and {@link java.lang.Object#equals equals()} correctly can be subject to differencingusing this library.
This library provides a framework in which different differencing algorithms may be used. If no algorithm is specified, a default algorithm is used.
@version $Revision: 1.1 $ $Date: 2006/03/12 00:24:21 $ @author Juanco Anez @see Delta @see DiffAlgorithm modifications:27 Apr 2003 bwm Added some comments whilst trying to figure out the algorithm 03 May 2003 bwm Factored out the algorithm implementation into a separate difference algorithm class to allow pluggable algorithms.This is used to simulate the functionality of a database including transaction independence. @author Jody Garnett @source $URL$
Comparator
may be passed as an argument to the constructor, and will thus be used. If not provided, the initial value in the a
("from") collection will be looked at to see if it supports the Comparable
interface. If so, its equals
and compareTo
methods will be invoked on the instances in the "from" and "to" collections; otherwise, for speed, hash codes from the objects will be used instead for comparison. The file FileDiff.java shows an example usage of this class, in an application similar to the Unix "diff" program.
LGPL, Jeff Pacechange
objects which form an edit script. The objects compared are traditionally lines of text from two files. Comparison options such as "ignore whitespace" are implemented by modifying the equals
and hashcode
methods for the objects compared. The basic algorithm is described in:
"An O(ND) Difference Algorithm and its Variations", Eugene Myers, Algorithmica Vol. 1 No. 2, 1986, p 251.
This class outputs different results from GNU diff 1.15 on some inputs. Our results are actually better (smaller change list, smaller total size of changes), but it would be nice to know why. Perhaps there is a memory overwrite bug in GNU diff 1.15. @author Stuart D. Gathman, translated from GNU diff 1.15Copyright (C) 2000 Business Management Systems, Inc.
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 1, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|