-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve code organization and restructuring code #59
Conversation
This file contains 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
...after moved the exception classes.
This also changed its package name.
This also fixed error during tests (e6c04f6)
This update make user know that `MatrixUtils` is an interface with all methods has their own default implementation.
In "Java Language Specification" (JLS) 11: > Every field declaration in the body of an interface is implicitly public, static, and final. > It is permitted to redundantly specify any or all of these modifiers for such fields. So here only removed the access modifier, but leave the `static` declared for code clarity and to avoid confusion. For more details, refer to <https://docs.oracle.com/javase/specs/jls/se11/html/jls-9.html#jls-9.3>
In "Java Language Specification" (JLS) 11: > Every field declaration in the body of an interface is implicitly public, static, and final. > It is permitted to redundantly specify any or all of these modifiers for such fields. Therefore, the access modifier was removed, but the `static` modifier was retained for code clarity and to avoid confusion. For more details, refer to <https://docs.oracle.com/javase/specs/jls/se11/html/jls-9.html#jls-9.3>.
mitsuki31
changed the title
Move several classes to specific directory
Improve code organization and restructuring code
Jul 16, 2023
Merged
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
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.
What's Changed
exception
.MatrixUtils
class to thecore
directory.public
modifier for all methods inside theMatrixUtils
interface to avoid confusion.Summary
In this set of changes, several modifications were made to improve the code organization and clarity of the project. The key changes include:
The exception classes were moved to a separate directory named
exception
. This restructuring enhances the project's structure and makes it easier to locate and manage exception-related code.The
MatrixUtils
class was relocated to thecore
directory. This move ensures that both either utility and core (core classes would be added as feature soon) classes are grouped together, promoting better organization and maintainability.Import statements in various classes were fixed after the relocation of certain classes. This ensures that all necessary dependencies are correctly referenced and resolves any compilation errors related to import statements.
The
public
modifier was removed for all methods inside theMatrixUtils
interface. According to the "Java Language Specification" (JLS) 11, interface fields are implicitlypublic
,static
, andfinal
. The removal of the access modifier aligns with this specification, preventing confusion and redundant declaration of access modifiers.These changes contribute to a more organized and streamlined codebase, improving code clarity, maintainability, and adherence to Java language standards.