目录

ScanOption

Class Info

public final class ScanOption implements Parcelable

调用startScan(String, ScanEndpointCallback, ScanOption)时,需要传入的选项。

Nested Class Summary

Qualifier and Type

Class Name and Description

static final class

ScanOption.Builder

ScanOption的构造类。

Public Field Summary

Qualifier and Type

Field and Description

static final Parcelable.Creator<ScanOption>

CREATOR

实现Parcelable接口必须提供的实例。

Public Method Summary

Qualifier and Type

Method Name and Description

int

describeContents()

返回当前Parcelable对象描述。

boolean

equals(Object other)

判断其他对象是否与本对象相同。

Policy

getPolicy()

获取ScanOption对象的连接策略。

int

hashCode()

获取哈希值。

void

writeToParcel(Parcel dest, int flags)

序列化打包,把值写入dest容器。

Public Fields

[h2]CREATOR

Fields

public static final Parcelable.Creator<ScanOption> CREATOR

实现Parcelable接口必须提供的实例。

Public Methods

[h2]describeContents

Method

public int describeContents()

返回当前Parcelable对象描述。

Returns

Type

Description

int

当前Parcelable对象描述。返回值如下:

  • 0:普通Parcelable对象。
  • 1:包含文件描述符的Parcelable对象。

[h2]equals

Method

public boolean equals(Object other)

判断其他对象是否与本对象相同。

Parameters

Name

Description

other

其他对象。

Returns

Type

Description

boolean

  • true:相同。
  • false:不相同。

[h2]getPolicy

Method

public Policy getPolicy()

获取ScanOption对象的连接策略。策略取值请参见Policy。

Returns

Type

Description

Policy

ScanOption对象的连接策略。

[h2]hashCode

Method

public int hashCode()

获取哈希值。

Returns

Type

Description

int

当前对象的哈希值。

[h2]writeToParcel

Method

public void writeToParcel(Parcel dest, int flags)

序列化打包,把值写入dest容器。

Parameters

Name

Description

dest

对象被写入的Parcel。

flags

写入方式,取值如下:

  • 0。
  • PARCELABLE_WRITE_RETURN_VALUE(详情查看Parcelable接口类)。