}
for (int i = 0; i < actionList.size(); i++) { ((InputAction) actionList.get(i)).performAction(event); }  }
    public void update(float time) {        actionList.clear();        eventList.clear();        if (keyboard != null) {            // added this to keep the polling from being done            // unless we want to do the bufferedKeyboard events.            // don't need the update when doing poll based            if (useBufferedKeyboard) keyboard.update();            for (int i = 0; i < keyActions.size(); i++) {                if (keyboard.isValidCommand(((InputAction) keyActions.get(i))                        .getKey(), ((KeyInputAction) keyActions.get(i))                        .allowsRepeats())) {                    eventList.add(((InputAction) keyActions.get(i)).getKey());                    actionList.add(keyActions.get(i));                }            }        }        if (useBufferedKeyboard && keyboard != null) {            KeyInput kInput = keyboard.getKeyInput();            while (kInput.next()) {                boolean keyPressed = kInput.state();                if (keyPressed) {                    for (int i = 0; i < buffKeyActions.size(); i++) {                        ((InputAction) buffKeyActions.get(i)).setKey(kInput                                .getKeyName(kInput.key()));                        ((KeyInputAction) buffKeyActions.get(i))                                .setKeyChar(kInput.keyChar());                        eventList.add(((InputAction) buffKeyActions.get(i))                                .getKey());                        actionList.add(buffKeyActions.get(i));                    }                }            }        }        if (mouse != null) {            mouse.update();            for (int i = 0; i < mouseActions.size(); i++) {                eventList.add(((InputAction) mouseActions.get(i)).getKey());                actionList.add(mouseActions.get(i));            }        }        event.setTime(time);        event.setKeys(keyboard.getKeyInput());        event.setMouse(mouse.getMouseInput());        event.setEventList(eventList);        for (int i = 0; i < actionList.size(); i++) {            ((InputAction) actionList.get(i)).performAction(event);        }    }