A previous post discusses how a map should be replaced with an object of a new class so that our code is written in an object-oriented way.
A quick look at this new class shows that it is quite big.
It includes
constructor for saving all constructor parameters in class fields
get methods, one for each class field; no set methods though
equals() method
hashCode() method
toString() method
That’s a lot of code to be added to your project.
Eclipse can generate all of it automatically so you do not have to type it.
But if you need to add additional parameters to the constructor, remove/change existing ones, you need to make changes manually everywhere.
Is there a better option?
Keep reading with a 7-day free trial
Subscribe to Selenium For Beginners to keep reading this post and get 7 days of free access to the full post archives.