public class ApplyChangeOptions extends Object
Example usage:
try (Comparer comparer = new Comparer(sourceFile)) {
comparer.add(targetFile);
comparer.compare();
ChangeInfo[] changes = comparer.getChanges();
changes[0].setComparisonAction(ComparisonAction.REJECT);
final ApplyChangeOptions applyChangeOptions = new ApplyChangeOptions(changes);
comparer.applyChanges(resultFile, applyChangeOptions);
}
Comparer,
ChangeInfo| Constructor and Description |
|---|
ApplyChangeOptions()
Initializes a new instance of the ApplyChangeOptions class.
|
ApplyChangeOptions(ChangeInfo[] changes)
Initializes a new instance of the ApplyChangeOptions class with array of changes.
|
ApplyChangeOptions(List<ChangeInfo> changes)
Initializes a new instance of the ApplyChangeOptions class with list of changes.
|
| Modifier and Type | Method and Description |
|---|---|
ChangeInfo[] |
getChanges()
Gets an array of changes that must be applied to the resulting document.
|
boolean |
isSaveOriginalState()
Gets a flag that determines is original state should be saved.
|
void |
setChanges(ChangeInfo[] value)
Sets an array of changes that must be applied to the resulting document.
|
void |
setChanges(List<ChangeInfo> value)
Sets a list of changes that must be applied to the resulting document.
|
void |
setSaveOriginalState(boolean saveOriginalState)
Sets a flag that determines is original state should be saved.
|
public ApplyChangeOptions()
Initializes a new instance of the ApplyChangeOptions class.
public ApplyChangeOptions(ChangeInfo[] changes)
Initializes a new instance of the ApplyChangeOptions class with array of changes.
changes - The list of changes to be appliedpublic ApplyChangeOptions(List<ChangeInfo> changes)
Initializes a new instance of the ApplyChangeOptions class with list of changes.
changes - The list of changes to be appliedpublic final ChangeInfo[] getChanges()
Gets an array of changes that must be applied to the resulting document.
public boolean isSaveOriginalState()
Gets a flag that determines is original state should be saved. Default value: false.
public final void setChanges(ChangeInfo[] value)
Sets an array of changes that must be applied to the resulting document.
value - The array of changes to be appliedpublic final void setChanges(List<ChangeInfo> value)
Sets a list of changes that must be applied to the resulting document.
value - The list of changes to be appliedpublic void setSaveOriginalState(boolean saveOriginalState)
Sets a flag that determines is original state should be saved.
saveOriginalState - True if original state should be saved, otherwise falseCopyright © 2024. All rights reserved.