
com.flash3388.flashlib.hid.Pov Maven / Gradle / Ivy
package com.flash3388.flashlib.hid;
import java.util.function.IntSupplier;
/**
* Represents a Point Of View on a Human Interface Device.
*
* Also known as a Hat Switch, a POV is a 360 switch indicating direction.
* It returns a degree value from 0 to 360 indicating direction.
*
*
* @since FlashLib 3.0.0
*/
public interface Pov extends IntSupplier {
/**
*
* Gets the value from the POV, ranging from 0 -> 360 if the switch is used,
* or -1
if the switch is not used.
*
*/
@Override
int getAsInt();
/**
* Gets a {@link Button} representation of this {@link Pov}. The button is considered activated
* (i.e. true) if the switch is used, i.e. {@link #getAsInt()} returns a non-negative
* value.
*
* @return a {@link Button} based on this.
*/
Button asButton();
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy