Most visited

Recently visited

Added in API level 14

WifiP2pDeviceList

public class WifiP2pDeviceList
extends Object implements Parcelable

java.lang.Object
    android.net.wifi.p2p.WifiP2pDeviceList


表示Wi-Fi P2p设备列表的类。 请注意,这些操作不是线程安全的。

也可以看看:

摘要(Summary)

Inherited constants

From interface android.os.Parcelable

Fields

public static final Creator<WifiP2pDeviceList> CREATOR

实现Parcelable接口

Public constructors

WifiP2pDeviceList()
WifiP2pDeviceList(WifiP2pDeviceList source)

复制构造函数

公共方法(Public methods)

int describeContents()

实现Parcelable接口

WifiP2pDevice get(String deviceAddress)

从列表中获取设备

Collection<WifiP2pDevice> getDeviceList()

获取设备列表

String toString()

返回对象的字符串表示形式。

void writeToParcel(Parcel dest, int flags)

实现Parcelable接口

继承方法(Inherited methods)

From class java.lang.Object
From interface android.os.Parcelable

Fields

CREATOR

Added in API level 14
Creator<WifiP2pDeviceList> CREATOR

实现Parcelable接口

Public constructors

WifiP2pDeviceList

Added in API level 14
WifiP2pDeviceList ()

WifiP2pDeviceList

Added in API level 14
WifiP2pDeviceList (WifiP2pDeviceList source)

复制构造函数

参数(Parameters)
source WifiP2pDeviceList

公共方法(Public methods)

describeContents

Added in API level 14
int describeContents ()

实现Parcelable接口

返回(Returns)
int a bitmask indicating the set of special object types marshaled by this Parcelable object instance.

get

Added in API level 18
WifiP2pDevice get (String deviceAddress)

从列表中获取设备

参数(Parameters)
deviceAddress String: is the address of the device
返回(Returns)
WifiP2pDevice WifiP2pDevice device found, or null if none found

getDeviceList

Added in API level 14
Collection<WifiP2pDevice> getDeviceList ()

获取设备列表

返回(Returns)
Collection<WifiP2pDevice>

toString

Added in API level 14
String toString ()

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

ObjecttoString方法返回一个字符串,其中包含对象为实例的类的名称,符号字符“ @ ”以及对象的哈希代码的无符号十六进制表示形式。 换句话说,这个方法返回一个字符串,其值等于:

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

返回(Returns)
String a string representation of the object.

writeToParcel

Added in API level 14
void writeToParcel (Parcel dest, 
                int flags)

实现Parcelable接口

参数(Parameters)
dest Parcel: The Parcel in which the object should be written.
flags int: Additional flags about how the object should be written. May be 0 or PARCELABLE_WRITE_RETURN_VALUE.

Hooray!