Builder
class Builder
| kotlin.Any | |
| ↳ | android.telephony.AvailableNetworkInfo.Builder |
Provides a convenient way to set the fields of a AvailableNetworkInfo when creating a new instance.
The example below shows how you might create a new AvailableNetworkInfo:
<code> AvailableNetworkInfo aNI = new AvailableNetworkInfo.Builder(subId) .setPriority(AvailableNetworkInfo.PRIORITY_MED) .setRadioAccessSpecifiers(radioAccessSpecifiers) .setMccMncs(mccMncs) .build(); </code>
Summary
| Public constructors | |
|---|---|
|
Creates an AvailableNetworkInfo Builder with specified subscription id. |
|
| Public methods | |
|---|---|
| AvailableNetworkInfo |
build() |
| AvailableNetworkInfo.Builder |
setMccMncs(mccMncs: MutableList<String!>)Sets the list of mccmncs associated with the subscription id. |
| AvailableNetworkInfo.Builder |
setPriority(priority: Int)Sets the priority for the subscription id. |
| AvailableNetworkInfo.Builder |
setRadioAccessSpecifiers(radioAccessSpecifiers: MutableList<RadioAccessSpecifier!>)Sets the list of mccmncs associated with the subscription id. |
Public constructors
Builder
Builder(subId: Int)
Creates an AvailableNetworkInfo Builder with specified subscription id.
| Parameters | |
|---|---|
subId |
Int: of the availableNetwork. |
Public methods
build
fun build(): AvailableNetworkInfo
| Return | |
|---|---|
AvailableNetworkInfo |
an AvailableNetworkInfo object with all the fields previously set by the Builder. This value cannot be null. |
setMccMncs
fun setMccMncs(mccMncs: MutableList<String!>): AvailableNetworkInfo.Builder
Sets the list of mccmncs associated with the subscription id.
| Parameters | |
|---|---|
mccMncs |
MutableList<String!>: nonull list of mccmncs. An empty List is still accepted. Please read documentation in AvailableNetworkInfo to see consequences of an empty List. This value cannot be null. |
| Return | |
|---|---|
AvailableNetworkInfo.Builder |
the original Builder object. This value cannot be null. |
setPriority
fun setPriority(priority: Int): AvailableNetworkInfo.Builder
Sets the priority for the subscription id.
| Parameters | |
|---|---|
priority |
Int: of the subscription id. See AvailableNetworkInfo.getPriority for more details Value is android.telephony.AvailableNetworkInfo#PRIORITY_HIGH, android.telephony.AvailableNetworkInfo#PRIORITY_MED, or android.telephony.AvailableNetworkInfo#PRIORITY_LOW |
| Return | |
|---|---|
AvailableNetworkInfo.Builder |
the original Builder object. This value cannot be null. |
setRadioAccessSpecifiers
fun setRadioAccessSpecifiers(radioAccessSpecifiers: MutableList<RadioAccessSpecifier!>): AvailableNetworkInfo.Builder
Sets the list of mccmncs associated with the subscription id.
| Parameters | |
|---|---|
radioAccessSpecifiers |
MutableList<RadioAccessSpecifier!>: nonull list of radioAccessSpecifiers. An empty List is still accepted. Please read documentation in AvailableNetworkInfo to see consequences of an empty List. This value cannot be null. |
| Return | |
|---|---|
AvailableNetworkInfo.Builder |
the original Builder object. This value cannot be null. |