public class NotifyMethod
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static int |
BEEP |
static int |
LIGHT |
static int |
MAX_METHOD |
static int |
VIBRATE |
Constructor and Description |
---|
NotifyMethod()
Create an instance of the NotifyMethod class.
|
NotifyMethod(boolean beep,
boolean vibrate,
boolean light)
Create an instance of the NotifyMethod class.
|
NotifyMethod(int value)
Create an instance of the NotifyMethod class.
|
Modifier and Type | Method and Description |
---|---|
boolean |
getMethod(int index)
Returns whether the notification status at the specified index.
|
java.lang.String |
getName(int index)
Returns the name of the notification method at the specified index as a string.
|
int |
getValue()
Returns the notification state in bit wise format.
|
void |
setMethods(int index,
boolean enabled)
Sets whether or not to be notified at the specified index.
|
void |
setValue(int value)
Sets the notification state to bit wise format.
|
java.lang.String |
toString() |
public static final int BEEP
public static final int VIBRATE
public static final int LIGHT
public static final int MAX_METHOD
public NotifyMethod()
public NotifyMethod(boolean beep, boolean vibrate, boolean light)
beep
- A boolean indicating whether beep sounds are used as notification methods.vibrate
- A boolean indicating whether to use vibration as the notification method.light
- A boolean indicating whether to use LEDs as a notification method.public NotifyMethod(int value)
value
- An integer representing the bitwise combination of the notification method.public java.lang.String getName(int index)
index
- The beep sound status is set to 0, the vibration is set to 1, and the LED is set to 2.public boolean getMethod(int index)
index
- The beep sound status is set to 0, the vibration is set to 1, and the LED is set to 2.public void setMethods(int index, boolean enabled)
index
- The beep sound status is set to 0, the vibration is set to 1, and the LED is set to 2.enabled
- A boolean indicating the status of the notification.public int getValue()
public void setValue(int value)
value
- An integer representing the notification state in bit wise format.public java.lang.String toString()
toString
in class java.lang.Object