• Post Reply Bookmark Topic Watch Topic
  • New Topic

NX: Is it OK to wrap readRecord in a new method?

 
Jacques Bosch
Ranch Hand
Posts: 319
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi guys.
My provided interface has this:

Would it be OK to wrap that in a method like below?

Clients of this class can then use either method, but the new one is more intuative because it returns a Record object (That wraps the String array).
Is this OK?
 
Ken Krebs
Ranch Hand
Posts: 451
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jacques,
Definitely.
It is OK to add any convenience methods you want to your Data class, as long as the original method performs as required it is OK to use it in the way you see fit.
 
Jacques Bosch
Ranch Hand
Posts: 319
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanx much.
I think I'm just a bit paranoid.
 
Gravity is a harsh mistress. But this tiny ad is pretty easy to deal with:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!