• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Can I change the Method signatures of Data class ?.

 
Gurpreet Saini
Ranch Hand
Posts: 295
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi reader,
Can I change the signature of find() method in data class to
public void DataInfo[] find(String toMatch)
{
//code
}
Does changing of methods signatures as above violates specifications ?. Please Reply soon.
Thank you,
:roll:
 
Nate Johnson
Ranch Hand
Posts: 301
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why do you want to do that? The requirements say to implement a method with the following signature which looks a lot like what you want to change the find method to...
public DataInfo[] criteriaFind(String criteria)
I dont know for sure if if would matter changing the signatures, but I would try to avoid it as much as possible.
 
Gurpreet Saini
Ranch Hand
Posts: 295
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi reader,
Yes, I was also in doubt that's why I posted this question. The reason for this was I wanted to exploit this method upto maximum extent and this is only possible if i change the signature from DataInfo to DataInfo[]. From criteria() method I wanted to give call backs to this method for giving me all the desired objects of DataInfo whose matching is satisfied with those of user. The problem with criteria () method is only with its parameter. Which is bounded to take only criteria String.
Apart from this can I implement my own methods in LocalDataAccess class which implements all the public methods of data class ?.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic