Skip to content
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

Generalize swapElement... Method #37

Closed
dvayanu opened this issue Nov 7, 2024 · 0 comments
Closed

Generalize swapElement... Method #37

dvayanu opened this issue Nov 7, 2024 · 0 comments

Comments

@dvayanu
Copy link
Member

dvayanu commented Nov 7, 2024

Currently this method is

	public void swapLocalizationsElement(int index1, int index2){
		String tmp1, tmp2;
		tmp1 = ((StringProperty)getList(PROP_LOCALIZATIONS).get(index1)).getString();
		tmp2 = ((StringProperty)getList(PROP_LOCALIZATIONS).get(index2)).getString();
		((StringProperty)getList(PROP_LOCALIZATIONS).get(index1)).setString(tmp2);
		((StringProperty)getList(PROP_LOCALIZATIONS).get(index2)).setString(tmp1);
	} //method

generated into every class and element. Instead the content of this method can be generalized.

	public void swapLocalizationsElement(int index1, int index2){
           swapListElement(PROP_LOCALIZATIONS, index1, index1);
        }
@dvayanu dvayanu transferred this issue from anotheria/ano-site Jan 17, 2025
@dvayanu dvayanu closed this as completed Jan 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant