// Path: src/main/java/com/github/strikerx3/jxinput/enums/XInputButton.java
// public enum XInputButton {
// 	A, B, X, Y,
// 	BACK, START,
// 	LEFT_SHOULDER, RIGHT_SHOULDER,
// 	LEFT_THUMBSTICK, RIGHT_THUMBSTICK,
// 	DPAD_UP, DPAD_DOWN, DPAD_LEFT, DPAD_RIGHT,
// 	GUIDE_BUTTON, UNKNOWN;
// }


import com.github.strikerx3.jxinput.enums.XInputButton;
package com.github.strikerx3.jxinput;


/**
 * Represents the delta (change) of the buttons between two successive polls.
 *
 * @author Ivan "StrikerX3" Oliveira
 */
public class XInputButtonsDelta {
    private final XInputButtons lastButtons;
    private final XInputButtons buttons;

    protected XInputButtonsDelta(final XInputButtons lastButtons, final XInputButtons buttons) {
        this.lastButtons = lastButtons;
        this.buttons = buttons;
    }

    /**
     * Returns <code>true</code> if the button was pressed (i.e. changed from released to pressed between two consecutive polls).
     * 
     * @param button the button
     * @return <code>true</code> if the button was pressed, <code>false</code> otherwise
     */
// Path: src/main/java/com/github/strikerx3/jxinput/enums/XInputButton.java
// public enum XInputButton {
// 	A, B, X, Y,
// 	BACK, START,
// 	LEFT_SHOULDER, RIGHT_SHOULDER,
// 	LEFT_THUMBSTICK, RIGHT_THUMBSTICK,
// 	DPAD_UP, DPAD_DOWN, DPAD_LEFT, DPAD_RIGHT,
// 	GUIDE_BUTTON, UNKNOWN;
// }


// Path: src/main/java/com/github/strikerx3/jxinput/XInputButtonsDelta.java
import com.github.strikerx3.jxinput.enums.XInputButton;

package com.github.strikerx3.jxinput;


/**
 * Represents the delta (change) of the buttons between two successive polls.
 *
 * @author Ivan "StrikerX3" Oliveira
 */
public class XInputButtonsDelta {
    private final XInputButtons lastButtons;
    private final XInputButtons buttons;

    protected XInputButtonsDelta(final XInputButtons lastButtons, final XInputButtons buttons) {
        this.lastButtons = lastButtons;
        this.buttons = buttons;
    }

    /**
     * Returns <code>true</code> if the button was pressed (i.e. changed from released to pressed between two consecutive polls).
     * 
     * @param button the button
     * @return <code>true</code> if the button was pressed, <code>false</code> otherwise
     */
    public boolean isPressed(final XInputButton button) {