AlarmBuilder

public final class AlarmBuilder extends IndexableBuilder<AlarmBuilder>

Builder to construct an Indexable for an alarm.

Constant Summary

Public Method Summary

AlarmBuilder
setAlarmInstances(AlarmInstanceBuilder... alarmInstanceBuilders)
Sets the instances, if any, associated with this alarm.
AlarmBuilder
setDayOfWeek(String... daysOfWeek)
Sets the scheduled days for a repeating alarm.
AlarmBuilder
setEnabled(boolean enabled)
Sets whether or not the alarm is currently active and has at least one associated instance in the AlarmInstanceBuilder.SCHEDULED, AlarmInstanceBuilder.FIRED or AlarmInstanceBuilder.SCHEDULED state.
AlarmBuilder
setHour(int hour)
Sets the hour that the alarm will fire.
AlarmBuilder
setIdentifier(String identifier)
Sets the immutable unique identifier of the alarm.
AlarmBuilder
setMessage(String message)
Sets the custom message associated with this alarm.
AlarmBuilder
setMinute(int minute)
Sets the minute that the alarm will fire.
AlarmBuilder
setRingtone(String ringtone)
Sets the ringtone to be played when the alarm fires, as a content URI of the media to be played, or AlarmClock.VALUE_RINGTONE_SILENT if no ringtone will be played.
AlarmBuilder
setVibrate(boolean vibrate)
Sets whether or not to activate the device vibrator when the alarm fires.

Inherited Method Summary

com.google.firebase.appindexing.builders.IndexableBuilder
final Indexable
build()
Finalize building the object.
T
put(String key, boolean... values)
Sets one or multiple boolean values for a property, replacing its previous values.
<S extends IndexableBuilder<?>> T
put(String key, S... values)
Sets one or multiple Indexable values for a property.
T
put(String key, Indexable... values)
Sets one or multiple Indexable values for a property, replacing its previous values.
T
put(String key, String... values)
Sets one or multiple string values for a property, replacing its previous values.
T
put(String key, long... values)
Sets one or multiple long values for a property, replacing its previous values.
T
setAlternateName(String... alternateNames)
Sets the alternate names for the content.
final T
setDescription(String description)
Sets the optional description of the content.
T
setId(String id)
Sets the ID for the Indexable.
final T
setImage(String url)
Sets the image of the content.
final <S extends IndexableBuilder<?>> T
setIsPartOf(S... collections)
Sets the sub-group or collection that this Indexable is part of.
final T
setKeywords(String... keywords)
Sets the keywords of the Indexable.
T
setMetadata(Indexable.Metadata.Builder metadataBuilder)
Sets the metadata.
final T
setName(String name)
Sets the name of the content, must not be null.
final T
setSameAs(String webUrl)
Sets the corresponding web URL.
final T
setUrl(String url)
Sets the URL.
Object
clone()
boolean
equals(Object arg0)
void
finalize()
final Class<?>
getClass()
int
hashCode()
final void
notify()
final void
notifyAll()
String
toString()
final void
wait(long arg0, int arg1)
final void
wait(long arg0)
final void
wait()

Constants

public static final String FRIDAY

Constant Value: "Friday"

public static final String MONDAY

Constant Value: "Monday"

public static final String SATURDAY

Constant Value: "Saturday"

public static final String SUNDAY

Constant Value: "Sunday"

public static final String THURSDAY

Constant Value: "Thursday"

public static final String TUESDAY

Constant Value: "Tuesday"

public static final String WEDNESDAY

Constant Value: "Wednesday"

Public Methods

public AlarmBuilder setAlarmInstances (AlarmInstanceBuilder... alarmInstanceBuilders)

Sets the instances, if any, associated with this alarm.

public AlarmBuilder setDayOfWeek (String... daysOfWeek)

Sets the scheduled days for a repeating alarm.

Parameters
daysOfWeek Must be one or more of { MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY, SUNDAY }.

public AlarmBuilder setEnabled (boolean enabled)

Sets whether or not the alarm is currently active and has at least one associated instance in the AlarmInstanceBuilder.SCHEDULED, AlarmInstanceBuilder.FIRED or AlarmInstanceBuilder.SCHEDULED state.

public AlarmBuilder setHour (int hour)

Sets the hour that the alarm will fire.

Parameters
hour Must be 0-23, inclusive

public AlarmBuilder setIdentifier (String identifier)

Sets the immutable unique identifier of the alarm.

public AlarmBuilder setMessage (String message)

Sets the custom message associated with this alarm.

public AlarmBuilder setMinute (int minute)

Sets the minute that the alarm will fire.

Parameters
minute Must be 0-59, inclusive

public AlarmBuilder setRingtone (String ringtone)

Sets the ringtone to be played when the alarm fires, as a content URI of the media to be played, or AlarmClock.VALUE_RINGTONE_SILENT if no ringtone will be played.

public AlarmBuilder setVibrate (boolean vibrate)

Sets whether or not to activate the device vibrator when the alarm fires.