So this is more of a question of curiosity rather than needing an issue solved, I think.
So I am sitting with AndEngine for Android in Android Studio and I want to make a AudioManager to handle all my audio, as a start.
I could implement AndEngine's interface called IAudioManager or extend BaseAudioManager, which is already an implementation of previously mentioned interface. Which brings me to my question. IAudioManager and IAudioEntity:
public interface IAudioManager<T extends IAudioEntity> {
public float getMasterVolume();
public void setMasterVolume(final float pMasterVolume);
public void add(final T pAudioEntity);
public boolean remove(final T pAudioEntity);
public void releaseAll();
}
public interface IAudioEntity {
public void play();
public void pause();
public void resume();
public void stop();
public float getVolume();
public void setVolume(final float pVolume);
public float getLeftVolume();
public float getRightVolume();
public void setVolume(final float pLeftVolume, final float pRightVolume);
public void onMasterVolumeChanged(final float pMasterVolume);
public void setLooping(final boolean pLooping);
public void release();
}
Now if I want to make an AudioManager using this interface it can be typed as T extends IAudioEntity. But I thought that you implemented interfaces instead of extending them, right?
So I am just wondering if there's something I have missed when it comes to interfaces. I'm not that keen on Java but I had a course at uni so I remember a lot of stuff but the details might be fuzzy, but does this just mean that the actual syntax in this case doesn't really matter as it would have to be implemented in order to be instantiated and anything extending that class in turn will be able to taken as argument in this AudioManager?