Forum Stats

  • 3,828,007 Users
  • 2,260,847 Discussions
  • 7,897,427 Comments

Discussions

How to name interfaces that does the same thing but have differnet signatures in methods?

meandmycode
meandmycode Member Posts: 36 Blue Ribbon
edited Sep 23, 2013 7:13AM in Java Programming

Hi,

I have a couple of classes, units, that can be restarted  ( thus implement a Restartable interface).

The problem I have is that we have two ( currently) sort of restarts:

void restart()  

void restart (int state);

And it is not so that the restart ()/restart(int) is used for only one type of unit. They mix units.

So I need two separate interfaces but I don't know how to name them since they both are describing the unit being restartable.

The only thing I can come up with is Restartable and Restartable2 but it will not tell user which one to use.

Any ideas?

//mike

Tagged:

Answers

This discussion has been closed.