I've seen this interface declaration in https://developer.android.com/training/basics/network-ops/connecting.html:
public interface DownloadCallback<T> {
interface Progress {
int ERROR = -1;
int CONNECT_SUCCESS = 0;
int GET_INPUT_STREAM_SUCCESS = 1;
int PROCESS_INPUT_STREAM_IN_PROGRESS = 2;
int PROCESS_INPUT_STREAM_SUCCESS = 3;
}
void updateFromDownload(T result);
...
}
As per https://docs.oracle.com/javase/tutorial/java/IandI/interfaceDef.html, interface body can only contain
In this case, the interface body contains another interface. How do you interpret this code block? Can someone please point me to the right documentation so I can learn more about this approach?