ChangeType

Contents
[ ]

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());
     }
 }
 

Fields

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.

Methods

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.

NONE

public static final ChangeType NONE

Represents no change.

MODIFIED

public static final ChangeType MODIFIED

Represents a modified change.

INSERTED

public static final ChangeType INSERTED

Represents an inserted change.

DELETED

public static final ChangeType DELETED

Represents a deleted change.

ADDED

public static final ChangeType ADDED

Represents an added change.

NOT_MODIFIED

public static final ChangeType NOT_MODIFIED

Represents a not modified change.

STYLE_CHANGED

public static final ChangeType STYLE_CHANGED

Represents a style changed change.

RESIZED

public static final ChangeType RESIZED

Represents a resized change.

MOVED

public static final ChangeType MOVED

Represents a moved change.

MOVED_AND_RESIZED

public static final ChangeType MOVED_AND_RESIZED

Represents a moved and resized change.

SHIFTED_AND_RESIZED

public static final ChangeType SHIFTED_AND_RESIZED

Represents a shifted and resized change.

values()

public static ChangeType[] values()

Returns: com.groupdocs.comparison.result.ChangeType[]

valueOf(String name)

public static ChangeType valueOf(String name)

Parameters:

Parameter Type Description
name java.lang.String

Returns: ChangeType

fromString(String toStringValue)

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

fromInt(int intValue)

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

toString()

public String toString()

String representation of ChangeType.

Returns: java.lang.String - string value of enum constant

toInt()

public int toInt()

Numeric representation of ChangeType.

Returns: int - numeric value of enum constant