目录

CLASS info
public final class Policy implements Parcelable
Represents the policy used for nearby device broadcasting and scanning.

Field Summary

TypeNameDesc
PolicyPOLICY_P2PPoint-to-point connection policy, which supports a 1-to-1 connection topology.
PolicyPOLICY_STARPoint-to-point connection policy, which supports a 1-to-N connection topology.
PolicyPOLICY_MESHPoint-to-point connection policy, which supports an M-to-N connection topology.

Public Method Summary

Return typeMethod name
booleanequals(Object other)
Checks whether any other object is the same as this object.
inthashCode()
Obtains the hash value.
stringtoString()
Converts a policy into a readable character string.
voidwriteToParcel(Parcel dest, int flags)
Writes this value into a dest parcel.

Public Methods

Method
public boolean equals(Object other)
Checks whether any other object is the same as this object.

Parameters

Parameter nameParameter desc
otherOther 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 nameParameter desc
destParcel to which this object is written.
flagsWriting mode.