public class StyleChangeInfo extends Object
It provides details such as the changed property name, values before and after the change, and so on. Use this class to retrieve information about style changes during the document comparison process.
Example usage:
try (Comparer comparer = new Comparer(sourceFile)) {
comparer.add(targetFile);
comparer.compare();
final ChangeInfo[] changes = comparer.getChanges();
for (ChangeInfo change : changes) {
// Access the style change information
final List<StyleChangeInfo> styleChanges = change.getStyleChanges();
for (StyleChangeInfo styleChange : styleChanges) {
// Print the style change information
System.out.println("PropertyName: " + styleChange.getPropertyName());
System.out.println("OldValue: " + styleChange.getOldValue());
System.out.println("NewValue: " + styleChange.getNewValue());
}
}
}
Comparer,
ChangeInfo| Constructor and Description |
|---|
StyleChangeInfo() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o) |
Object |
getNewValue()
Gets the new value of the property.
|
Object |
getOldValue()
Gets the old value of the property.
|
String |
getPropertyName()
Gets the name of the property that was changed.
|
int |
hashCode() |
void |
setNewValue(Object value)
Sets the new value of the property.
|
void |
setOldValue(Object value)
Sets the old value of the property.
|
void |
setPropertyName(String value)
Sets the name of the property that was changed.
|
public final Object getNewValue()
Gets the new value of the property.
public final Object getOldValue()
Gets the old value of the property.
public final String getPropertyName()
Gets the name of the property that was changed.
public final void setNewValue(Object value)
Sets the new value of the property.
value - The new value of the propertypublic final void setOldValue(Object value)
Sets the old value of the property.
value - The old value of the propertypublic final void setPropertyName(String value)
Sets the name of the property that was changed.
value - The property nameCopyright © 2024. All rights reserved.