TimerBuilder

public final class TimerBuilder extends IndexableBuilder<TimerBuilder>

Builder to construct an Indexable for a timer.

Constant Summary

String EXPIRED The timer is expired.
String MISSED The timer is missed.
String PAUSED The timer is paused.
String RESET The timer is reset to its initial value.
String STARTED The timer is started.
String UNKNOWN The timer is in an unknown error state.

Public Method Summary

TimerBuilder
setExpireTime(Calendar wallClockExpirationTime)
Sets the wall clock time at which the timer will, or did, expire.
TimerBuilder
setIdentifier(String identifier)
Sets the immutable unique identifier of the timer.
TimerBuilder
setLength(long lengthInMilliseconds)
Sets the total length of the timer when it was created, in milliseconds.
TimerBuilder
setMessage(String message)
Sets the custom message associated with this timer.
TimerBuilder
setRemainingTime(long remainingTimeInMilliseconds)
Sets the amount of time remaining when the timer was started or stopped, in milliseconds.
TimerBuilder
setRingtone(String ringtone)
Sets the ringtone to be played when the timer expires, as a content URI of the media to be played, or AlarmClock.VALUE_RINGTONE_SILENT if no ringtone will be played.
TimerBuilder
setTimerStatus(String status)
Sets the current status of the timer.
TimerBuilder
setVibrate(boolean vibrate)
Sets whether or not to activate the device vibrator when the timer expires.

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 EXPIRED

The timer is expired.

Constant Value: "Expired"

public static final String MISSED

The timer is missed.

Constant Value: "Missed"

public static final String PAUSED

The timer is paused.

Constant Value: "Paused"

public static final String RESET

The timer is reset to its initial value.

Constant Value: "Reset"

public static final String STARTED

The timer is started.

Constant Value: "Started"

public static final String UNKNOWN

The timer is in an unknown error state.

Constant Value: "Unknown"

Public Methods

public TimerBuilder setExpireTime (Calendar wallClockExpirationTime)

Sets the wall clock time at which the timer will, or did, expire.

public TimerBuilder setIdentifier (String identifier)

Sets the immutable unique identifier of the timer.

public TimerBuilder setLength (long lengthInMilliseconds)

Sets the total length of the timer when it was created, in milliseconds.

public TimerBuilder setMessage (String message)

Sets the custom message associated with this timer.

public TimerBuilder setRemainingTime (long remainingTimeInMilliseconds)

Sets the amount of time remaining when the timer was started or stopped, in milliseconds.

public TimerBuilder setRingtone (String ringtone)

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

public TimerBuilder setTimerStatus (String status)

Sets the current status of the timer.

Parameters
status Must be one of { STARTED, PAUSED, EXPIRED, MISSED, RESET, UNKNOWN }.

public TimerBuilder setVibrate (boolean vibrate)

Sets whether or not to activate the device vibrator when the timer expires.