public static final class
CriticalSound.Builder
extends Object
Public Method Summary
CriticalSound |
build()
Builds a new
CriticalSound instance from the fields set on this builder. |
CriticalSound.Builder |
setCritical(boolean critical)
Sets the critical alert flag on the sound configuration.
|
CriticalSound.Builder |
setName(String name)
The name of a sound file in your app's main bundle or in the
Library/Sounds folder
of your app’s container directory. |
CriticalSound.Builder |
setVolume(double volume)
The volume for the critical alert's sound.
|
Inherited Method Summary
Public Methods
public CriticalSound build ()
Builds a new CriticalSound
instance from the fields set on this builder.
Returns
- A non-null
CriticalSound
.
Throws
IllegalArgumentException | If the volume value is out of range. |
---|
public CriticalSound.Builder setCritical (boolean critical)
Sets the critical alert flag on the sound configuration.
Parameters
critical | True to set the critical alert flag. |
---|
Returns
- This builder.
public CriticalSound.Builder setName (String name)
The name of a sound file in your app's main bundle or in the Library/Sounds
folder
of your app’s container directory. Specify the string default
to play the system
sound.
Parameters
name | Sound file name. |
---|
Returns
- This builder.
public CriticalSound.Builder setVolume (double volume)
The volume for the critical alert's sound. Must be a value between 0.0 (silent) and 1.0 (full volume).
Parameters
volume | A volume between 0.0 (inclusive) and 1.0 (inclusive). |
---|
Returns
- This builder.