Skip to content

Rename api methods to match SLAMS#8

Open
LeStegii wants to merge 1 commit intomasterfrom
feat/rename-methods
Open

Rename api methods to match SLAMS#8
LeStegii wants to merge 1 commit intomasterfrom
feat/rename-methods

Conversation

@LeStegii
Copy link
Copy Markdown
Collaborator

@LeStegii LeStegii commented Oct 20, 2023

  • Renamed all API methods to fit their SLAMS "counterpart"

  • getFoo() --> foo()

  • Add deprecated methods

  • Fix examples

@Almighty-Satan
Copy link
Copy Markdown
Owner

Should setters also be renamed?

@LeStegii
Copy link
Copy Markdown
Collaborator Author

Should setters also be renamed?

I thought about this, but how exactly would you rename them?

If we choose the design theme of using foo() as the getter and foo(Type value) as the setter, there could be confusion with SLAMS, as there is a value() method and a value(Context context) method, but both of them are getters.

@Almighty-Satan
Copy link
Copy Markdown
Owner

Almighty-Satan commented Oct 23, 2023

What about renaming ConfigEntry#setValue to something like ConfigEntry#set or ConfigEntry#put? I think that's the only setter in the entire project.

@LeStegii
Copy link
Copy Markdown
Collaborator Author

What about renaming ConfigEntry#setValue to something like ConfigEntry#set or ConfigEntry#put? I think that's the only setter in the entire project.

That would work, yea. Are there any setters in SLAMS that would have to be changed as well then in order to fit the style?

@Almighty-Satan
Copy link
Copy Markdown
Owner

Almighty-Satan commented Oct 23, 2023

That would work, yea. Are there any setters in SLAMS that would have to be changed as well then in order to fit the style?

I don't think SLAMS has any setters (at least not in the API) as messages can only be changed via LanguageParsers. Someone should double-check this tho.

return this.valueToWrite(Function.identity());
}

boolean isModified();
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this also be renamed?

Copy link
Copy Markdown
Collaborator Author

@LeStegii LeStegii Oct 26, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

isModified() could be renamted to something like modified() I think.

@Almighty-Satan Almighty-Satan added the enhancement New feature or request label Oct 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants