to top
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 The printer id. Cannot be null.
name The printer name. Cannot be empty.
status 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 Other info from which to start building.

Public Methods

public PrinterInfo build ()

Added in API level 19

Creates a new PrinterInfo.

Returns

public PrinterInfo.Builder setCapabilities (PrinterCapabilitiesInfo capabilities)

Added in API level 19

Sets the printer capabilities.

Parameters
capabilities The capabilities.
Returns
  • 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 The description.
Returns
  • 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 The name.
Returns
  • This builder.

public PrinterInfo.Builder setStatus (int status)

Added in API level 19

Sets the printer status.

Parameters
status The status.
Returns
  • This builder.