GetChangeOptions
Leave feedback
On this page
Inheritance: java.lang.Object
public class GetChangeOptions
Allows configuring filtering for retrieving specific change types from the comparison result.
Example usage:
try (Comparer comparer = new Comparer(sourceFile)) {
comparer.add(targetFile);
comparer.compare();
GetChangeOptions getChangeOptions = new GetChangeOptions();
getChangeOptions.setFilter(ChangeType.DELETED);
ChangeInfo[] changes = comparer.getChanges(getChangeOptions);
System.out.println(Arrays.toString(changes));
}
| Constructor | Description |
|---|---|
| GetChangeOptions() | Initializes a new instance of the GetChangeOptions class. |
| GetChangeOptions(ChangeType filter) | Initializes a new instance of the GetChangeOptions class for specified filter type. |
| Method | Description |
|---|---|
| getFilter() | Gets the filter for retrieving specific change types from the comparison result. |
| setFilter(ChangeType value) | Sets the filter for retrieving specific change types from the comparison result. |
public GetChangeOptions()
Initializes a new instance of the GetChangeOptions class.
public GetChangeOptions(ChangeType filter)
Initializes a new instance of the GetChangeOptions class for specified filter type.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| filter | ChangeType |
public final ChangeType getFilter()
Gets the filter for retrieving specific change types from the comparison result.
Returns: ChangeType - the filter specifying the types of changes to be retrieved.
public final void setFilter(ChangeType value)
Sets the filter for retrieving specific change types from the comparison result.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| value | ChangeType | The filter specifying the types of changes to be retrieved. |
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.