|
LibreOffice Module xmerge (master) 1
|
This is an interface used by the DiffAlgorithm and MergeAlgorithm to access a Document.
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 Object content. 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 obj1 and obj2 in the Iterator are considered equal. More... | |
| void | refresh () |
A method to force the Iterator to traverse the tree again to refresh the content. More... | |
This is an interface used by the DiffAlgorithm and MergeAlgorithm to access a Document.
Definition at line 27 of file Iterator.java.
| Object org.openoffice.xmerge.merger.Iterator.currentElement | ( | ) |
Return the current element Object content.
Object at current position. Implemented in org.openoffice.xmerge.merger.diff.NodeIterator, and org.openoffice.xmerge.merger.diff.ObjectArrayIterator.
References Object.
| int org.openoffice.xmerge.merger.Iterator.elementCount | ( | ) |
Return the total element count 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.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 obj1 and obj2 in the Iterator are considered equal.
As not every Object in the Iterator can implement its own equal method, with this equivalent method, we can allow flexibility for the Iterator to choose a custom way to compare two objects. Two objects can even be compared based on the position in the Iterator rather than by the content via this option.
| obj1 | The first Object |
| obj2 | The second Object. |
true if equal, false otherwise. 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().
| Object org.openoffice.xmerge.merger.Iterator.next | ( | ) |
Move to next element in the sequence.
Object of the next element in the sequence. If there is no next element, then return null. Implemented in org.openoffice.xmerge.merger.diff.NodeIterator, and org.openoffice.xmerge.merger.diff.ObjectArrayIterator.
References Object.
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 Iterator to traverse the tree again to refresh the content.
It is used mainly for Iterator 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.NodeIterator, and org.openoffice.xmerge.merger.diff.ObjectArrayIterator.
Referenced by org.openoffice.xmerge.merger.diff.IteratorRowCompare.computeDiffs().
| Object org.openoffice.xmerge.merger.Iterator.start | ( | ) |
Move to the beginning of the sequence.
Object of the first element in the sequence. If it is empty, then return null. Implemented in org.openoffice.xmerge.merger.diff.NodeIterator, and org.openoffice.xmerge.merger.diff.ObjectArrayIterator.
References Object.
Referenced by org.openoffice.xmerge.merger.diff.IteratorRowCompare.computeDiffs(), org.openoffice.xmerge.merger.diff.IteratorLCSAlgorithm.createDiffTable(), and org.openoffice.xmerge.merger.merge.PositionBaseRowMerge.mergeCellSequences().