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

Remove methods get/setCustomParameters from ImageGenerator interface #66

Open
MStefko opened this issue Jan 23, 2018 · 1 comment
Open

Comments

@MStefko
Copy link
Contributor

MStefko commented Jan 23, 2018

Interfaces should be implementation-agnostic, i.e. you shouldn't care which specific implementation of the interface you are talking to when you use one of the interface's methods.

setCustomParameters(Map map) obviously breaks this pattern, since you need to know what are the keys that the class expects to find inside map.

getCustomParameters() could in theory be kept, since you could iterate over the returned map to e.g. print all parameters of the simulation, but that is again skimming the implementation-specific line.

These two methods are not required for the interface to work and should be removed.

@kmdouglass
Copy link
Member

Note that ImageGenerator was renamed to Simulator in #67

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants