Builder
class Builder
kotlin.Any | |
↳ | android.telephony.data.NetworkSliceInfo.Builder |
Provides a convenient way to set the fields of a NetworkSliceInfo
when creating a new instance.
The example below shows how you might create a new SliceInfo
:
<code> SliceInfo response = new SliceInfo.Builder() .setSliceServiceType(SLICE_SERVICE_TYPE_URLLC) .build(); </code>
Summary
Public constructors | |
---|---|
Builder() Default constructor for Builder. |
Public methods | |
---|---|
NetworkSliceInfo |
build() Build the |
NetworkSliceInfo.Builder |
setMappedHplmnSliceDifferentiator(mappedHplmnSliceDifferentiator: Int) Set the HPLMN Slice Differentiator. |
NetworkSliceInfo.Builder |
setMappedHplmnSliceServiceType(mappedHplmnSliceServiceType: Int) Set the HPLMN Slice Service Type. |
NetworkSliceInfo.Builder |
setSliceDifferentiator(sliceDifferentiator: Int) Set the Slice Differentiator. |
NetworkSliceInfo.Builder |
setSliceServiceType(mSliceServiceType: Int) Set the Slice Service Type. |
NetworkSliceInfo.Builder |
Set the slice status. |
Public constructors
Public methods
build
fun build(): NetworkSliceInfo
Build the NetworkSliceInfo
.
Return | |
---|---|
NetworkSliceInfo |
the NetworkSliceInfo object. This value cannot be null . |
setMappedHplmnSliceDifferentiator
fun setMappedHplmnSliceDifferentiator(mappedHplmnSliceDifferentiator: Int): NetworkSliceInfo.Builder
Set the HPLMN Slice Differentiator.
A value ofSLICE_DIFFERENTIATOR_NO_SLICE
indicates that there is no corresponding Slice of the HPLMN.
Parameters | |
---|---|
mappedHplmnSliceDifferentiator |
Int: Value is between MIN_SLICE_DIFFERENTIATOR and MAX_SLICE_DIFFERENTIATOR inclusive |
Return | |
---|---|
NetworkSliceInfo.Builder |
The same instance of the builder. This value cannot be null . |
Exceptions | |
---|---|
java.lang.IllegalArgumentException |
if the parameter is not in the expected range. |
setMappedHplmnSliceServiceType
fun setMappedHplmnSliceServiceType(mappedHplmnSliceServiceType: Int): NetworkSliceInfo.Builder
Set the HPLMN Slice Service Type.
Return | |
---|---|
NetworkSliceInfo.Builder |
The same instance of the builder. This value cannot be null . |
setSliceDifferentiator
fun setSliceDifferentiator(sliceDifferentiator: Int): NetworkSliceInfo.Builder
Set the Slice Differentiator.
A value ofSLICE_DIFFERENTIATOR_NO_SLICE
indicates that there is no corresponding Slice.
Parameters | |
---|---|
sliceDifferentiator |
Int: Value is between MIN_SLICE_DIFFERENTIATOR and MAX_SLICE_DIFFERENTIATOR inclusive |
Return | |
---|---|
NetworkSliceInfo.Builder |
The same instance of the builder. This value cannot be null . |
Exceptions | |
---|---|
java.lang.IllegalArgumentException |
if the parameter is not in the expected range. |
setSliceServiceType
fun setSliceServiceType(mSliceServiceType: Int): NetworkSliceInfo.Builder
Set the Slice Service Type.
Return | |
---|---|
NetworkSliceInfo.Builder |
The same instance of the builder. This value cannot be null . |
setStatus
fun setStatus(status: Int): NetworkSliceInfo.Builder
Set the slice status.
Return | |
---|---|
NetworkSliceInfo.Builder |
The same instance of the builder. This value cannot be null . |
Exceptions | |
---|---|
java.lang.IllegalArgumentException |
if the status is invalid. |