I used the following link. Why was the Java static nested interface used? .
In my code base, I have:
public interface I1{ public static interface I2 { public void doSomething(); }
And in another class in another package:
public abstract class SomeClass implements I2{
Now, my question is: "Is it really a good design to put I2 in I1 "?
EDIT:
public interface XClientSession { static public interface OnQueryResultSentListener { public void onQueryResultSent(XQueryResult result); } public void setOnQueryResultSentListener(OnQueryResultSentListener listener); }
/ And in another file I have ...
public abstract class XAppAgentBase extends IntentService implements XClient, OnQueryResultSentListener { }
java
TheLostMind
source share