LibreOffice Module xmerge (master)
1
|
This is an interface used by the DiffAlgorithm and MergeAlgorithm to access a. More...
Public Member Functions | |
Object | next () |
Move to next element in the sequence. More... | |
Object | start () |
Move to the beginning of the sequence. More... | |
Object | currentElement () |
Return the current element. More... | |
int | elementCount () |
Return the total element count in the sequence. More... | |
boolean | equivalent (Object obj1, Object obj2) |
A method to allow the difference algorithm to test whether the. More... | |
void | refresh () |
A method to force the. More... | |
This is an interface used by the DiffAlgorithm and MergeAlgorithm to access a.
.
Definition at line 27 of file Iterator.java.
Object org.openoffice.xmerge.merger.Iterator.currentElement | ( | ) |
Return the current element.
content.
Implemented in org.openoffice.xmerge.merger.diff.NodeIterator, and org.openoffice.xmerge.merger.diff.ObjectArrayIterator.
int org.openoffice.xmerge.merger.Iterator.elementCount | ( | ) |
Return the total element count in the sequence.
Implemented in org.openoffice.xmerge.merger.diff.ObjectArrayIterator, and org.openoffice.xmerge.merger.diff.NodeIterator.
Referenced by org.openoffice.xmerge.merger.diff.IteratorLCSAlgorithm.computeDiffs(), and org.openoffice.xmerge.merger.diff.IteratorLCSAlgorithm.createDiffTable().
boolean org.openoffice.xmerge.merger.Iterator.equivalent | ( | Object | obj1, |
Object | obj2 | ||
) |
A method to allow the difference algorithm to test whether the.
and
in the
are considered equal.
As not every
in the
can implement its own equal method, with this equivalent method, we can allow flexibility for the
to choose a custom way to compare two objects. Two objects can even be compared based on the position in the
rather than by the content via this option.
obj1 | The first |
obj2 | The second . |
Implemented in org.openoffice.xmerge.merger.diff.ObjectArrayIterator, and org.openoffice.xmerge.merger.diff.NodeIterator.
Referenced by org.openoffice.xmerge.merger.diff.IteratorRowCompare.computeDiffs(), org.openoffice.xmerge.merger.diff.IteratorLCSAlgorithm.createDiffTable(), and org.openoffice.xmerge.merger.merge.PositionBaseRowMerge.mergeCellSequences().
Object org.openoffice.xmerge.merger.Iterator.next | ( | ) |
Move to next element in the sequence.
Implemented in org.openoffice.xmerge.merger.diff.NodeIterator, and org.openoffice.xmerge.merger.diff.ObjectArrayIterator.
Referenced by org.openoffice.xmerge.merger.diff.IteratorRowCompare.computeDiffs(), org.openoffice.xmerge.merger.diff.IteratorLCSAlgorithm.createDiffTable(), org.openoffice.xmerge.converter.xml.xslt.DocumentDeserializerImpl.deserialize(), org.openoffice.xmerge.converter.xml.xslt.PluginFactoryImpl.getDeviceFileExtension(), and org.openoffice.xmerge.merger.merge.PositionBaseRowMerge.mergeCellSequences().
void org.openoffice.xmerge.merger.Iterator.refresh | ( | ) |
A method to force the.
to traverse the tree again to refresh the content.
It is used mainly for
objects which take a snapshot instead of dynamically traversing the tree. The current position will be set to the beginning.
Implemented in org.openoffice.xmerge.merger.diff.ObjectArrayIterator, and org.openoffice.xmerge.merger.diff.NodeIterator.
Referenced by org.openoffice.xmerge.merger.diff.IteratorRowCompare.computeDiffs().
Object org.openoffice.xmerge.merger.Iterator.start | ( | ) |
Move to the beginning of the sequence.
Implemented in org.openoffice.xmerge.merger.diff.NodeIterator, and org.openoffice.xmerge.merger.diff.ObjectArrayIterator.
Referenced by org.openoffice.xmerge.merger.diff.IteratorRowCompare.computeDiffs(), org.openoffice.xmerge.merger.diff.IteratorLCSAlgorithm.createDiffTable(), and org.openoffice.xmerge.merger.merge.PositionBaseRowMerge.mergeCellSequences().