我收到 Java 的编译时错误:
MyClass is not abstract and does not override abstract method
onClassicControllerRemovedEvent(
wiiusej.wiiusejevents.wiiuseapievents.ClassicControllerRemovedEvent)
in wiiusejevents.utils.WiimoteListener)
这是课程:
import wiiusej.WiiUseApiManager;
import wiiusej.Wiimote;
import wiiusej.wiiusejevents.physicalevents.ExpansionEvent;
import wiiusej.wiiusejevents.physicalevents.IREvent;
import wiiusej.wiiusejevents.physicalevents.MotionSensingEvent;
import wiiusej.wiiusejevents.physicalevents.WiimoteButtonsEvent;
import wiiusej.wiiusejevents.utils.WiimoteListener;
import wiiusej.wiiusejevents.wiiuseapievents.DisconnectionEvent;
import wiiusej.wiiusejevents.wiiuseapievents.NunchukInsertedEvent;
import wiiusej.wiiusejevents.wiiuseapievents.NunchukRemovedEvent;
import wiiusej.wiiusejevents.wiiuseapievents.StatusEvent;
public class MyClass implements WiimoteListener{
public void onButtonsEvent(WiimoteButtonsEvent arg0) {
System.out.println(arg0);
if (arg0.isButtonAPressed()){
WiiUseApiManager.shutdown();
}
}
public void onIrEvent(IREvent arg0) {
System.out.println(arg0);
}
public void onMotionSensingEvent(MotionSensingEvent arg0) {
System.out.println(arg0);
}
public void onExpansionEvent(ExpansionEvent arg0) {
System.out.println(arg0);
}
public void onStatusEvent(StatusEvent arg0) {
System.out.println(arg0);
}
public void onDisconnectionEvent(DisconnectionEvent arg0) {
System.out.println(arg0);
}
public void onNunchukInsertedEvent(NunchukInsertedEvent arg0) {
System.out.println(arg0);
}
public void onNunchukRemovedEvent(NunchukRemovedEvent arg0) {
System.out.println(arg0);
}
public static void main(String[] args) {
Wiimote[] wiimotes = WiiUseApiManager.getWiimotes(1, true);
Wiimote wiimote = wiimotes[0];
wiimote.activateIRTRacking();
wiimote.activateMotionSensing();
wiimote.addWiiMoteEventListeners(new MyClass());
}
}
我可以更好地解释这个错误的含义吗?