codecamp

鸿蒙OS NotificationSortingMap

NotificationSortingMap

java.lang.Object

|---ohos.event.notification.NotificationSortingMap

public class NotificationSortingMap
extends Object
implements Sequenceable

提供所有已订阅通知中的活动通知的排序信息。

Since:

2

嵌套类摘要

从接口 ohos.utils.Sequenceable 继承的嵌套类/接口
Sequenceable.ProducerT

字段摘要

修饰符和类型 字段 描述
static Sequenceable.ProducerNotificationSortingMap PRODUCER 从 Parcel 创建 NotificationSortingMap 实例。

构造函数摘要

构造函数 描述
NotificationSortingMap() 用于创建 NotificationSortingMap 实例的默认构造函数。

方法总结

修饰符和类型 方法 描述
ListString getHashCode() 获取已排序的哈希码列表。
boolean getNotificationSorting(String hashCode, NotificationSorting sorting) 根据哈希码获取 NotificationSorting。
boolean marshalling(Parcel out) 将 NotificationSortingMap 对象编组到 Parcel 中。
String toString() 返回对象的字符串表示形式。
boolean unmarshalling(Parcel in) 从 Parcel 中解组 NotificationSortingMap 对象。
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
从接口 ohos.utils.Sequenceable 继承的方法
hasFileDescriptor

字段详细信息

PRODUCER

public static final Sequenceable.ProducerNotificationSortingMap PRODUCER

从 Parcel 创建 NotificationSortingMap 实例。

Since:

4

构造函数详细信息

NotificationSortingMap

public NotificationSortingMap()

用于创建 NotificationSortingMap 实例的默认构造函数。

方法详情

getHashCode

public ListString getHashCode()

获取已排序的哈希码列表。

返回:

返回已排序的哈希码列表。

Since:

2

getNotificationSorting

public boolean getNotificationSorting(String hashCode, NotificationSorting sorting)

根据哈希码获取 NotificationSorting。

参数:

参数名称 参数描述
hashCode 表示使用getHashCode()获取的哈希码。
sorting 表示哈希码的排序信息。

返回:

如果根据哈希码获取 NotificationSorting,则返回 true; 否则返回 false。

Since:

2

marshalling

public boolean marshalling(Parcel out)

将 NotificationSortingMap 对象编组到 Parcel 中。

进程可以调用 unmarshalling(ohos.utils.Parcel) 方法从 Parcel 中解组 NotificationSortingMap 对象以实现进程间通信 (IPC)。

指定者:

接口 Sequenceable 中的编组

参数:

参数名称 参数描述
out 指示用于编组的 Parcel 对象。

返回:

如果编组成功,则返回 true; 否则返回 false。

Since:

2

unmarshalling

public boolean unmarshalling(Parcel in)

从 Parcel 中解组 NotificationSortingMap 对象。

指定者:

在接口 Sequenceable 中解组

参数:

参数名称 参数描述
in 指示用于解组的 Parcel 对象。

返回:

如果解组成功,则返回 true; 否则返回 false。

Since:

2

toString

public String toString()

从类复制的描述:对象

返回对象的字符串表示形式。 通常,toString 方法返回一个“以文本方式表示”该对象的字符串。 结果应该是一个简洁但信息丰富的表示,易于人们阅读。 建议所有子类重写此方法。

Object 类的 toString 方法返回一个字符串,该字符串由对象作为其实例的类的名称、at 符号字符“@”和对象哈希码的无符号十六进制表示形式组成。 换句话说,此方法返回一个等于以下值的字符串:

 getClass().getName() + '@' + Integer.toHexString(hashCode()) 

覆盖:

类 Object 中的 toString

返回:

对象的字符串表示形式。

Since:

4

鸿蒙OS NotificationSorting
鸿蒙OS NotificationSubscribeInfo
温馨提示
下载编程狮App,免费阅读超1000+编程语言教程
取消
确定
目录

鸿蒙OS 开发

鸿蒙OS 术语

鸿蒙OS Java API参考

鸿蒙OS ohos.aafwk.ability

鸿蒙OS ohos.aafwk.abilityjet.activedata

鸿蒙OS ohos.aafwk.content

鸿蒙OS java.lang

鸿蒙OS java.Util

鸿蒙OS java.Util class

鸿蒙OS ohos.data.dataability

鸿蒙OS ohos.data.dataability class

鸿蒙OS ohos.agp.components

鸿蒙OS ohos.agp.components interface

鸿蒙OS ohos.agp.components class

鸿蒙OS ohos.global.configuration

鸿蒙OS java.io

鸿蒙OS ohos.data.resultset

鸿蒙OS ohos.data.resultset interface

关闭

MIP.setData({ 'pageTheme' : getCookie('pageTheme') || {'day':true, 'night':false}, 'pageFontSize' : getCookie('pageFontSize') || 20 }); MIP.watch('pageTheme', function(newValue){ setCookie('pageTheme', JSON.stringify(newValue)) }); MIP.watch('pageFontSize', function(newValue){ setCookie('pageFontSize', newValue) }); function setCookie(name, value){ var days = 1; var exp = new Date(); exp.setTime(exp.getTime() + days*24*60*60*1000); document.cookie = name + '=' + value + ';expires=' + exp.toUTCString(); } function getCookie(name){ var reg = new RegExp('(^| )' + name + '=([^;]*)(;|$)'); return document.cookie.match(reg) ? JSON.parse(document.cookie.match(reg)[2]) : null; }