| CLASS info |
| public final class Policy implements Parcelable |
| Represents the policy used for nearby device broadcasting and scanning. |
| Type | Name | Desc |
| Policy | POLICY_P2P | Point-to-point connection policy, which supports a 1-to-1 connection topology. |
| Policy | POLICY_STAR | Point-to-point connection policy, which supports a 1-to-N connection topology. |
| Policy | POLICY_MESH | Point-to-point connection policy, which supports an M-to-N connection topology. |
| Return type | Method name |
| boolean | equals(Object other) Checks whether any other object is the same as this object. |
| int | hashCode() Obtains the hash value. |
| string | toString() Converts a policy into a readable character string. |
| void | writeToParcel(Parcel dest, int flags) Writes this value into a dest parcel. |
| Method |
| public boolean equals(Object other) |
| Checks whether any other object is the same as this object. |
Parameters
| Parameter name | Parameter desc |
| other | Other object. |
| Method |
| public int hashCode() |
| Obtains the hash value. |
| Method |
| public String toString() |
| Converts a policy into a readable character string. |
| Method |
| public void writeToParcel(Parcel dest, int flags) |
| Converts a policy into a readable character string. |
Parameters
| Parameter name | Parameter desc |
| dest | Parcel to which this object is written. |
| flags | Writing mode. |