StyleChangeInfo
Inheritance: java.lang.Object
public class StyleChangeInfo
The StyleChangeInfo class represents information about a style change in a compared document.
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 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());
}
}
}
Constructors
Constructor | Description |
---|---|
StyleChangeInfo() |
Methods
Method | Description |
---|---|
getPropertyName() | Gets the name of the property that was changed. |
setPropertyName(String value) | Sets the name of the property that was changed. |
getNewValue() | Gets the new value of the property. |
setNewValue(Object value) | Sets the new value of the property. |
getOldValue() | Gets the old value of the property. |
setOldValue(Object value) | Sets the old value of the property. |
equals(Object o) | {@inheritDoc} |
hashCode() | {@inheritDoc} |
StyleChangeInfo()
public StyleChangeInfo()
getPropertyName()
public final String getPropertyName()
Gets the name of the property that was changed.
Returns: java.lang.String - the property name
setPropertyName(String value)
public final void setPropertyName(String value)
Sets the name of the property that was changed.
Parameters:
Parameter | Type | Description |
---|---|---|
value | java.lang.String | The property name |
getNewValue()
public final Object getNewValue()
Gets the new value of the property.
Returns: java.lang.Object - the new value of the property
setNewValue(Object value)
public final void setNewValue(Object value)
Sets the new value of the property.
Parameters:
Parameter | Type | Description |
---|---|---|
value | java.lang.Object | The new value of the property |
getOldValue()
public final Object getOldValue()
Gets the old value of the property.
Returns: java.lang.Object - the old value of the property
setOldValue(Object value)
public final void setOldValue(Object value)
Sets the old value of the property.
Parameters:
Parameter | Type | Description |
---|---|---|
value | java.lang.Object | The old value of the property |
equals(Object o)
public boolean equals(Object o)
Parameters:
Parameter | Type | Description |
---|---|---|
o | java.lang.Object |
Returns: boolean
hashCode()
public int hashCode()
Returns: int