Skip to content

Most visited

Recently visited

navigation
Added in API level 19

PrinterInfo.Builder

public static final class PrinterInfo.Builder
extends Object

java.lang.Object
   ↳ android.print.PrinterInfo.Builder


Builder for creating of a PrinterInfo.

Summary

Public constructors

PrinterInfo.Builder(PrinterId printerId, String name, int status)

Constructor.

PrinterInfo.Builder(PrinterInfo other)

Constructor.

Public methods

PrinterInfo build()

Creates a new PrinterInfo.

PrinterInfo.Builder setCapabilities(PrinterCapabilitiesInfo capabilities)

Sets the printer capabilities.

PrinterInfo.Builder setDescription(String description)

Sets the localized printer description which is shown to the user

PrinterInfo.Builder setName(String name)

Sets the localized printer name which is shown to the user

PrinterInfo.Builder setStatus(int status)

Sets the printer status.

Inherited methods

From class java.lang.Object

Public constructors

PrinterInfo.Builder

Added in API level 19
PrinterInfo.Builder (PrinterId printerId, 
                String name, 
                int status)

Constructor.

Parameters
printerId PrinterId: The printer id. Cannot be null.
name String: The printer name. Cannot be empty.
status int: The printer status. Must be a valid status.
Throws
IllegalArgumentException If the printer id is null, or the printer name is empty or the status is not a valid one.

PrinterInfo.Builder

Added in API level 19
PrinterInfo.Builder (PrinterInfo other)

Constructor.

Parameters
other PrinterInfo: Other info from which to start building.

Public methods

build

Added in API level 19
PrinterInfo build ()

Creates a new PrinterInfo.

Returns
PrinterInfo A new PrinterInfo.

setCapabilities

Added in API level 19
PrinterInfo.Builder setCapabilities (PrinterCapabilitiesInfo capabilities)

Sets the printer capabilities.

Parameters
capabilities PrinterCapabilitiesInfo: The capabilities.
Returns
PrinterInfo.Builder This builder.

setDescription

Added in API level 19
PrinterInfo.Builder setDescription (String description)

Sets the localized printer description which is shown to the user

Parameters
description String: The description.
Returns
PrinterInfo.Builder This builder.

setName

Added in API level 19
PrinterInfo.Builder setName (String name)

Sets the localized printer name which is shown to the user

Parameters
name String: The name.
Returns
PrinterInfo.Builder This builder.

setStatus

Added in API level 19
PrinterInfo.Builder setStatus (int status)

Sets the printer status.

Parameters
status int: The status.
Returns
PrinterInfo.Builder This builder.

See also:

This site uses cookies to store your preferences for site-specific language and display options.

Hooray!

This class requires API level or higher

This doc is hidden because your selected API level for the documentation is . You can change the documentation API level with the selector above the left navigation.

For more information about specifying the API level your app requires, read Supporting Different Platform Versions.