JavaTM Platform
Standard Ed. 6

javax.print.attribute.standard
类 OutputDeviceAssigned

java.lang.Object
  继承者 javax.print.attribute.TextSyntax
      继承者 javax.print.attribute.standard.OutputDeviceAssigned
所有已实现的接口:
Serializable, Cloneable, Attribute, PrintJobAttribute

public final class OutputDeviceAssigned
extends TextSyntax
implements PrintJobAttribute

OutputDeviceAssigned 类是打印属性类,它是一种文本属性,标识了服务将此作业所分配到的输出设备。如果输出设备实现了嵌入式的 PrintService 实例,则打印机无需设置此属性。如果打印服务器实现了 PrintService 实例,则该值可能会为空(零长度字符串),或者在服务为作业分配输出设备前不会返回值。此属性在单个服务支持多个设备(即所谓的“扇出”)时尤其有用。

IPP 兼容性:字符串值提供了 IPP 名称值。语言环境提供了 IPP 自然语言。由 getName() 返回的类别名称提供了 IPP 属性名称。

另请参见:
序列化表格

构造方法摘要
OutputDeviceAssigned(String deviceName, Locale locale)
          构造具有给定设备名称和语言环境的新 OutputDeviceAssigned 属性。
 
方法摘要
 boolean equals(Object object)
          返回此 OutputDeviceAssigned 属性是否等效于传入的对象。
 Class<? extends Attribute> getCategory()
          获取将用作此打印属性值的“类别”的打印属性类。
 String getName()
          获取类别的名称,此属性值是该类别的一个实例。
 
从类 javax.print.attribute.TextSyntax 继承的方法
getLocale, getValue, hashCode, toString
 
从类 java.lang.Object 继承的方法
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

构造方法详细信息

OutputDeviceAssigned

public OutputDeviceAssigned(String deviceName,
                            Locale locale)
构造具有给定设备名称和语言环境的新 OutputDeviceAssigned 属性。

参数:
deviceName - 设备名称。
locale - 文本字符串的自然语言。将 null 解释为默认的语言环境,这是 Locale.getDefault() 返回的语言环语。
抛出:
NullPointerException - (未经检查的异常)如果 deviceName 为 null。
方法详细信息

equals

public boolean equals(Object object)
返回此 OutputDeviceAssigned 属性是否等效于传入的对象。若要等效,以下所有条件都必须为 true:
  1. object 不为 null。
  2. object 是类 OutputDeviceAssigned 的一个实例。
  3. 此 OutputDeviceAssigned 属性的底层字符串和 object 的底层字符串相等。
  4. 此 OutputDeviceAssigned 的语言环境和 object 的语言环境相等。

覆盖:
TextSyntax 中的 equals
参数:
object - 要比较的对象。
返回:
如果 object 等效于此 OutputDeviceAssigned 属性,则返回 True,否则返回 false。
另请参见:
Object.hashCode(), Hashtable

getCategory

public final Class<? extends Attribute> getCategory()
获取将用作此打印属性值的“类别”的打印属性类。

对于类 OutputDeviceAssigned,该类别就是类 OutputDeviceAssigned 本身。

指定者:
接口 Attribute 中的 getCategory
返回:
打印属性类(类别),这是类 java.lang.Class 的一个实例。

getName

public final String getName()
获取类别的名称,此属性值是该类别的一个实例。

对于类 OutputDeviceAssigned,类别名称是 "output-device-assigned"

指定者:
接口 Attribute 中的 getName
返回:
属性类别名称。

JavaTM Platform
Standard Ed. 6

提交错误或意见
有关更多的 API 参考资料和开发人员文档,请参阅 Java SE 开发人员文档。该文档包含更详细的、面向开发人员的描述,以及总体概述、术语定义、使用技巧和工作代码示例。

版权所有 2007 Sun Microsystems, Inc. 保留所有权利。 请遵守许可证条款。另请参阅文档重新分发政策