| CLASS info |
| public final class Policy implements Parcelable |
| Nearby广播、扫描过程的策略信息 |
| Type | Name | Desc |
| Policy | POLICY_P2P | 点到点连接策略,支持1对1的连接拓扑 |
| Policy | POLICY_STAR | 点到点连接策略,支持1对N的连接拓扑 |
| Policy | POLICY_MESH | 点到点连接策略,支持M对N的连接拓扑 |
| Return type | Method name |
| boolean | equals(Object other) 判断其他对象是否与本对象相同 |
| int | hashCode() 获取hash值 |
| string | toString() 把策略类型转化成可读的字符串 |
| void | writeToParcel(Parcel dest, int flags) 序列化打包,把值写入dest容器 |
| Method |
| public boolean equals(Object other) |
| 判断其他对象是否与本对象相同。 |
Parameters
| Parameter name | Parameter desc |
| other | 其他对象 |
| Method |
| public int hashCode() |
| 获取hash值。 |
| Method |
| public String toString() |
| 把策略转化成可读的字符串。 |
| Method |
| public void writeToParcel(Parcel dest, int flags) |
| 把策略转化成可读的字符串。 |
Parameters
| Parameter name | Parameter desc |
| dest | 对象被写入的parcel |
| flags | 写入方式 |