Please note that the contents of this offline web site may be out of date. To access the most recent documentation visit the online version .
Note that links that point to online resources are green in color and will open in a new window.
We would love it if you could give us feedback about this material by filling this form (You have to be online to fill it)
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)

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)

Constructor.

Parameters
other Other info from which to start building.

Public Methods

public PrinterInfo build ()

Creates a new PrinterInfo .

Returns

public PrinterInfo.Builder setCapabilities ( PrinterCapabilitiesInfo capabilities)

Sets the printer capabilities.

Parameters
capabilities The capabilities.
Returns
  • This builder.

public PrinterInfo.Builder setDescription ( String description)

Sets the localized printer description which is shown to the user

Parameters
description The description.
Returns
  • This builder.

public PrinterInfo.Builder setName ( String name)

Sets the localized printer name which is shown to the user

Parameters
name The name.
Returns
  • This builder.

public PrinterInfo.Builder setStatus (int status)

Sets the printer status.

Parameters
status The status.
Returns
  • This builder.