目录

CLASS info
public final class Policy implements Parcelable
Nearby广播、扫描过程的策略信息

Field Summary

TypeNameDesc
PolicyPOLICY_P2P点到点连接策略,支持1对1的连接拓扑
PolicyPOLICY_STAR点到点连接策略,支持1对N的连接拓扑
PolicyPOLICY_MESH点到点连接策略,支持M对N的连接拓扑

Public Method Summary

Return typeMethod name
boolean​equals(Object other)
判断其他对象是否与本对象相同
int​hashCode()
获取hash值
string​toString()
把策略类型转化成可读的字符串
void​writeToParcel(Parcel dest, int flags)
序列化打包,把值写入dest容器

Public Methods

Method
public boolean equals(Object other)
判断其他对象是否与本对象相同。

Parameters

Parameter nameParameter desc
other其他对象
Method
public int hashCode()
获取hash值。
Method
public String toString()
把策略转化成可读的字符串。
Method
public void writeToParcel(Parcel dest, int flags)
把策略转化成可读的字符串。

Parameters

Parameter nameParameter desc
dest对象被写入的parcel
flags写入方式