Class IDChanger
The changes are applied by calling a handler for single changes, consecutive changes, and arbitrary changes.
- Since:
- 3.29
- Author:
- Eike Stepper
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceA handler for ID changes. -
Method Summary
Modifier and TypeMethodDescriptionstatic voidchangeIDs(Map<Integer, Integer> changes, int initialTempID, IDChanger.ChangeHandler handler) Changes IDs according to the given map of changes.static voidchangeIDs(Map<Integer, Integer> changes, IDChanger.ChangeHandler handler) Changes IDs according to the given map of changes.
-
Method Details
-
changeIDs
Changes IDs according to the given map of changes.The map's keys are the old IDs, and the values are the new IDs.
If there are conflicts among the changes (i.e., an old ID is changed to a new ID that is also an old ID), temporary IDs are introduced to resolve the conflicts.
The changes are applied by calling the given handler. The algorithm tries to group changes into single changes, consecutive changes, and arbitrary changes to minimize the number of calls to the handler.
-
changeIDs
public static void changeIDs(Map<Integer, Integer> changes, int initialTempID, IDChanger.ChangeHandler handler) Changes IDs according to the given map of changes.The map's keys are the old IDs, and the values are the new IDs.
If there are conflicts among the changes (i.e., an old ID is changed to a new ID that is also an old ID), temporary IDs are introduced to resolve the conflicts.
The changes are applied by calling the given handler. The algorithm tries to group changes into single changes, consecutive changes, and arbitrary changes to minimize the number of calls to the handler.
-