public boolean apply(final TwoInputStates states) { final InputState currentState = states.getCurrent(); final InputState previousState = states.getPrevious(); return currentState .getKeyboardState() .getKeysReleasedSince(previousState.getKeyboardState()) .contains(key); }
@Override public boolean apply(final TwoInputStates twoInputStates) { final InputState currentState = twoInputStates.getCurrent(); final InputState previousState = twoInputStates.getPrevious(); return !currentState .getKeyboardState() .getKeysPressedSince(previousState.getKeyboardState()) .isEmpty(); }