Sequenceablepublic final class NotificationSlotGroup extends Object implements Sequenceable
NotificationSlotSystemCapability.Notification#ANSSequenceable.Producer<T>| 限定符和类型 | 字段 | 说明 |
|---|---|---|
static Sequenceable.Producer<NotificationSlotGroup> |
PRODUCER |
Creates a
NotificationSlotGroup instance from a Parcel. |
| 构造器 | 说明 |
|---|---|
NotificationSlotGroup() |
Default constructor used to create a
NotificationSlotGroup instance. |
NotificationSlotGroup(String id,
String name) |
A constructor used to create a
NotificationSlotGroup instance with the group ID and name initialized. |
| 限定符和类型 | 方法 | 说明 |
|---|---|---|
String |
getDescription() |
Obtains the description of this
NotificationSlotGroup object,
which is set by setDescription(java.lang.String). |
String |
getId() |
Obtains the ID of this
NotificationSlotGroup object, which is set by
NotificationSlotGroup(java.lang.String,java.lang.String). |
String |
getName() |
Obtains the name of this
NotificationSlotGroup object, which is set by
NotificationSlotGroup(java.lang.String,java.lang.String). |
List<NotificationSlot> |
getSlots() |
Obtains a list of notification slots bound to this
NotificationSlotGroup object. |
boolean |
isDisabled() |
Checks whether this
NotificationSlotGroup is disabled. |
boolean |
marshalling(Parcel out) |
Marshals
NotificationSlotGroup objects and writes them into Parcel. |
void |
setDescription(String desc) |
Sets the description for this
NotificationSlotGroup object. |
String |
toString() |
Returns a string representation of the object.
|
boolean |
unmarshalling(Parcel in) |
Unmarshals a
NotificationSlotGroup object from a Parcel. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waithasFileDescriptorpublic static final Sequenceable.Producer<NotificationSlotGroup> PRODUCER
NotificationSlotGroup instance from a Parcel.public NotificationSlotGroup(String id, String name)
NotificationSlotGroup instance with the group ID and name initialized.id - Indicates the ID of the NotificationSlotGroup. The ID must be unique and its length must not
exceed 1000 characters (the excess part is automatically truncated).name - Indicates the name of the NotificationSlotGroup. Its length must not exceed 1000 characters
(the excess part is automatically truncated).public NotificationSlotGroup()
NotificationSlotGroup instance.public String getId()
NotificationSlotGroup object, which is set by
NotificationSlotGroup(java.lang.String,java.lang.String).NotificationSlotGroup.public String getName()
NotificationSlotGroup object, which is set by
NotificationSlotGroup(java.lang.String,java.lang.String).NotificationSlotGroup.public List<NotificationSlot> getSlots()
NotificationSlotGroup object.
NotificationSlot#setSlotGroup(String) is used to bind a notification slot to a notification slot group.NotificationSlotGroup.public void setDescription(String desc)
NotificationSlotGroup object.desc - Describes this NotificationSlotGroup object. Its length must not exceed
1000 characters (the excess part is automatically truncated).public String getDescription()
NotificationSlotGroup object,
which is set by setDescription(java.lang.String).NotificationSlotGroup.public boolean isDisabled()
NotificationSlotGroup is disabled. If it is disabled, notifications associated
with the notification slots belonging to this group cannot be published.true if this NotificationSlotGroup is disabled;
returns false otherwise.public boolean marshalling(Parcel out)
NotificationSlotGroup objects and writes them into Parcel.
A process can call the unmarshalling(ohos.utils.Parcel) method to unmarshal
a NotificationSlotGroup object from a Parcel to implement inter-process
communication (IPC).
marshalling 在接口中 Sequenceableout - Indicates the Parcel object for marshalling.true if the marshalling is successful; returns false otherwise.public boolean unmarshalling(Parcel in)
NotificationSlotGroup object from a Parcel.unmarshalling 在接口中 Sequenceablein - Indicates the Parcel object for unmarshalling.true if the unmarshalling is successful; returns false otherwise.public String toString()
ObjecttoString method returns a string that
"textually represents" this object. The result should
be a concise but informative representation that is easy for a
person to read.
It is recommended that all subclasses override this method.
The toString method for class Object
returns a string consisting of the name of the class of which the
object is an instance, the at-sign character `@', and
the unsigned hexadecimal representation of the hash code of the
object. In other words, this method returns a string equal to the
value of:
getClass().getName() + '@' + Integer.toHexString(hashCode())