ChangeType
Leave feedback
On this page
Inheritance: java.lang.Object, java.lang.Enum
public enum ChangeType extends Enum<ChangeType>
The ChangeType enum represents the types of changes that can occur during the document comparison process.
Each constant in this enum represents a specific type of change and provides a human-readable description and a numeric value.
Example usage:
try (Comparer comparer = new Comparer(sourceFile)) {
comparer.add(targetFile);
comparer.compare();
final ChangeInfo[] changes = comparer.getChanges();
for (ChangeInfo changeInfo : changes) {
// Get the ChangeType for a specific change
final ChangeType changeType = changeInfo.getType();
// Print the ChangeType information
System.out.println("Description: " + changeType.toString());
System.out.println("Value: " + changeType.toInt());
}
}
| Field | Description |
|---|---|
| NONE | Represents no change. |
| MODIFIED | Represents a modified change. |
| INSERTED | Represents an inserted change. |
| DELETED | Represents a deleted change. |
| ADDED | Represents an added change. |
| NOT_MODIFIED | Represents a not modified change. |
| STYLE_CHANGED | Represents a style changed change. |
| RESIZED | Represents a resized change. |
| MOVED | Represents a moved change. |
| MOVED_AND_RESIZED | Represents a moved and resized change. |
| SHIFTED_AND_RESIZED | Represents a shifted and resized change. |
| Method | Description |
|---|---|
| values() | |
| valueOf(String name) | |
| fromString(String toStringValue) | Parses string representation of ChangeType to get the enum constant. |
| fromInt(int intValue) | Creates new constant of enum ChangeType using provided numeric value. |
| toString() | String representation of ChangeType. |
| toInt() | Numeric representation of ChangeType. |
public static final ChangeType NONE
Represents no change.
public static final ChangeType MODIFIED
Represents a modified change.
public static final ChangeType INSERTED
Represents an inserted change.
public static final ChangeType DELETED
Represents a deleted change.
public static final ChangeType ADDED
Represents an added change.
public static final ChangeType NOT_MODIFIED
Represents a not modified change.
public static final ChangeType STYLE_CHANGED
Represents a style changed change.
public static final ChangeType RESIZED
Represents a resized change.
public static final ChangeType MOVED
Represents a moved change.
public static final ChangeType MOVED_AND_RESIZED
Represents a moved and resized change.
public static final ChangeType SHIFTED_AND_RESIZED
Represents a shifted and resized change.
public static ChangeType[] values()
Returns: com.groupdocs.comparison.result.ChangeType[]
public static ChangeType valueOf(String name)
Parameters:
| Parameter | Type | Description |
|---|---|---|
| name | java.lang.String |
Returns: ChangeType
public static ChangeType fromString(String toStringValue)
Parses string representation of ChangeType to get the enum constant.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| toStringValue | java.lang.String | The string representation of ChangeType |
Returns: ChangeType - ChangeType enum constant associated with input string
public static ChangeType fromInt(int intValue)
Creates new constant of enum ChangeType using provided numeric value.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| intValue | int | The numeric representation of ChangeType |
Returns: ChangeType - ChangeType enum constant associated with numeric value
public String toString()
String representation of ChangeType.
Returns: java.lang.String - string value of enum constant
public int toInt()
Numeric representation of ChangeType.
Returns: int - numeric value of enum constant
Was this page helpful?
Any additional feedback you'd like to share with us?
Please tell us how we can improve this page.
Thank you for your feedback!
We value your opinion. Your feedback will help us improve our documentation.