Android APIs
public static final class

PrinterInfo.Builder

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

Class Overview

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.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

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

Added in API level 19

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.

public PrinterInfo.Builder (PrinterInfo other)

Added in API level 19

Constructor.

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

Public Methods

public PrinterInfo build ()

Added in API level 19

Creates a new PrinterInfo.

Returns
PrinterInfo A new PrinterInfo.

public PrinterInfo.Builder setCapabilities (PrinterCapabilitiesInfo capabilities)

Added in API level 19

Sets the printer capabilities.

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

public PrinterInfo.Builder setDescription (String description)

Added in API level 19

Sets the localized printer description which is shown to the user

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

public PrinterInfo.Builder setName (String name)

Added in API level 19

Sets the localized printer name which is shown to the user

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

public PrinterInfo.Builder setStatus (int status)

Added in API level 19

Sets the printer status.

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