目录

class info
public interface TimeCategories
Interface class that represents the semantic time status of the current time and location. The time status includes the following defined in the TimeBarrier class: TIME_CATEGORY_MORNING (morning), TIME_CATEGORY_AFTERNOON (afternoon), TIME_CATEGORY_EVENING (evening), TIME_CATEGORY_NIGHT (night), TIME_CATEGORY_WEEKDAY (weekday), TIME_CATEGORY_WEEKEND (weekend),  TIME_CATEGORY_HOLIDAY (holiday),and TIME_CATEGORY_NOT_HOLIDAY (non-holiday date).

Public Method Summary

Return typeMethod name
abstract int[]getTimeCategories()
abstract booleanisTimeCategory(int desiredTimeCategory)

Public Methods

Method
public abstract int[] getTimeCategories()
Gets the time status of the current user location.

Return

Typedesc
int[]Integer constant array corresponding to all time status labels applicable to the current time and location. The time status includes the following defined in the TimeBarrier class: TIME_CATEGORY_MORNING (morning), TIME_CATEGORY_AFTERNOON (afternoon), TIME_CATEGORY_EVENING (evening), TIME_CATEGORY_NIGHT (night), TIME_CATEGORY_WEEKDAY (weekday), TIME_CATEGORY_WEEKEND (weekend), TIME_CATEGORY_HOLIDAY (holiday), and TIME_CATEGORY_NOT_HOLIDAY (non-holiday date).
Method
public abstract boolean isTimeCategory(int desiredTimeCategory)
Determines whether the current time status information contains the passed time status label.

Parameters

Parameter nameParameter desc
desiredTimeCategoryTime status label.


Return

Typedesc
booleanIndicates whether the current time status information contains the passed time status. The options are true and false.