chore: Neighborhoods improvements for ListChangeMove#2076
Merged
triceo merged 4 commits intoTimefoldAI:mainfrom Feb 5, 2026
Merged
chore: Neighborhoods improvements for ListChangeMove#2076triceo merged 4 commits intoTimefoldAI:mainfrom
triceo merged 4 commits intoTimefoldAI:mainfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR improves the neighborhoods API for ListChangeMove by adding comprehensive test coverage, detailed Javadoc documentation, and a new shiftValue convenience method.
Changes:
- Added extensive test coverage for
ListChangeMoveincluding same-entity moves, cross-entity moves, move properties, and rebase functionality - Added comprehensive Javadoc documentation for the
Movesfactory class andMutableSolutionViewinterface - Introduced
shiftValuemethod as an alternative tomoveValueInListusing offset-based positioning - Improved validation with bounds checking for list indices in
moveValueInList - Refactored
ListChangeMove.execute()for better readability
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| ListChangeMoveTest.java | Added comprehensive test coverage organized into nested test classes for same-entity moves, cross-entity moves, move properties, and rebasing |
| MoveDirectorTest.java | Added tests for the new shiftValue method including edge cases and validation |
| Moves.java | Added detailed Javadoc documentation for the factory class and all factory methods |
| ListChangeMove.java | Minor refactoring of execute method for improved readability |
| MutableSolutionView.java | Added new shiftValue method and convenience overloads using PositionInList, plus comprehensive documentation |
| MoveDirector.java | Implemented shiftValue method, enhanced validation in moveValueInList, and refactored list operations |
core/src/main/java/ai/timefold/solver/core/preview/api/move/MutableSolutionView.java
Outdated
Show resolved
Hide resolved
core/src/main/java/ai/timefold/solver/core/impl/move/MoveDirector.java
Outdated
Show resolved
Hide resolved
core/src/main/java/ai/timefold/solver/core/preview/api/move/builtin/Moves.java
Outdated
Show resolved
Hide resolved
core/src/main/java/ai/timefold/solver/core/preview/api/move/MutableSolutionView.java
Outdated
Show resolved
Hide resolved
core/src/test/java/ai/timefold/solver/core/preview/api/move/builtin/ListChangeMoveTest.java
Outdated
Show resolved
Hide resolved
core/src/main/java/ai/timefold/solver/core/impl/move/MoveDirector.java
Outdated
Show resolved
Hide resolved
core/src/main/java/ai/timefold/solver/core/preview/api/move/builtin/ListChangeMove.java
Outdated
Show resolved
Hide resolved
core/src/main/java/ai/timefold/solver/core/preview/api/move/builtin/ListChangeMove.java
Outdated
Show resolved
Hide resolved
core/src/main/java/ai/timefold/solver/core/preview/api/move/builtin/Moves.java
Outdated
Show resolved
Hide resolved
Christopher-Chianelli
approved these changes
Feb 5, 2026
Contributor
Christopher-Chianelli
left a comment
There was a problem hiding this comment.
LGTM; I think the Javadoc for swap moves can be a bit clearer.
core/src/main/java/ai/timefold/solver/core/preview/api/move/builtin/Moves.java
Outdated
Show resolved
Hide resolved
core/src/test/java/ai/timefold/solver/core/preview/api/move/builtin/ListChangeMoveTest.java
Show resolved
Hide resolved
core/src/test/java/ai/timefold/solver/core/preview/api/move/builtin/ListChangeMoveTest.java
Show resolved
Hide resolved
core/src/test/java/ai/timefold/solver/core/impl/move/MoveDirectorTest.java
Show resolved
Hide resolved
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


No description provided.