public class Event extends Object
SystemCapability.SysAppComponents#CONTACT| 限定符和类型 | 字段 | 说明 |
|---|---|---|
static int |
CUSTOM_LABEL |
Indicates a custom label.
|
static int |
EVENT_ANNIVERSARY |
Indicates an anniversary event.
|
static int |
EVENT_BIRTHDAY |
TYPE BIRTHDAY
|
static int |
EVENT_OTHER |
Indicates an event of the
OTHER type. |
static int |
INVALID_LABEL_ID |
Indicates an invalid label ID.
|
| 构造器 | 说明 |
|---|---|
Event(String eventDate,
String customLabelName) |
A constructor used to create an
Event instance based on a specified event date and a custom label name. |
Event(Context context,
String eventDate,
int labelId) |
A constructor used to create an
Event instance based on the application context and
a specified event date and label ID. |
| 限定符和类型 | 方法 | 说明 |
|---|---|---|
boolean |
equals(Object object) |
Indicates whether some other object is "equal to" this one.
|
String |
getEventDate() |
Obtains the event date.
|
String |
getLabelName() |
Obtains the label name of an attribute.
|
int |
hashCode() |
Returns a hash code value for the object.
|
void |
setCustomLabelName(String labelName) |
Set custom label data.
|
void |
setEventDate(String eventDate) |
Sets the event date.
|
void |
setLabelId(Context context,
int labelId) |
Set label id and name.
|
public static final int CUSTOM_LABEL
If this label type is used, attribute CustomLabelName must be set.
public static final int EVENT_ANNIVERSARY
public static final int EVENT_BIRTHDAY
public static final int EVENT_OTHER
OTHER type.public static final int INVALID_LABEL_ID
public Event(Context context, String eventDate, int labelId)
Event instance based on the application context and
a specified event date and label ID.
The label ID can be any of the following:
context - Indicates the application context.eventDate - Indicates the event date.labelId - Indicates the label ID.public String getEventDate()
public void setEventDate(String eventDate)
eventDate - Indicates the event date.public void setCustomLabelName(String labelName)
labelName - Indicates the custom label name to set.public int hashCode()
HashMap.hashCode 在类中 ObjectObject.equals(java.lang.Object),
System.identityHashCode(java.lang.Object)public void setLabelId(Context context, int labelId)
context - Indicates the application context.labelId - Indicates the label ID to set.public boolean equals(Object object)
equals 在类中 Objectobj - the reference object with which to compare.true if this object is the same as the obj argument;
false otherwise.Object.hashCode(),
HashMappublic String getLabelName()