Say... you're trying to write a networkCallback code in java:
public interface NetworkCallback {
void onNetworkResult1(Object object);
void onNetworkFailure(Object object);
}
you want to use it, but you sometimes have two network results:
public interface NetworkCallback2 implements NetworkCallback {
void onNetworkResult2(Object object);
}
and sometimes, you might have three:
public interface NetworkCallback3 implements NetworkCallback2 {
void onNetworkResult3(Object object);
}
Is this considered bad practice? What are the better alternatives?