JavaTM 2 Platform
Standard Ed. 6

javax.print.attribute.standard
类 NumberOfDocuments

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

public final class NumberOfDocuments
extends IntegerSyntax
implements PrintJobAttribute

NumberOfDocuments 类是整数值形式的打印属性类,它指示打印机已接受此作业的单份文档数,而不管文档的打印数据是否已到达打印机。

IPP Compatibility: 整数值给出了 IPP 整数值。getName() 所返回的类别名称给出了 IPP 属性名称。

另请参见:
序列化表格

构造方法摘要
NumberOfDocuments(int value)
          构造具有给定整数值的新 NumberOfDocuments 属性。
 
方法摘要
 boolean equals(Object object)
          返回此文档数属性是否等效于传入的对象。
 Class<? extends Attribute> getCategory()
          获取将被用作此打印属性值的“类别”的打印属性类。
 String getName()
          获取类别名称,此属性值为该类别的实例。
 
从类 javax.print.attribute.IntegerSyntax 继承的方法
getValue, hashCode, toString
 
从类 java.lang.Object 继承的方法
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

构造方法详细信息

NumberOfDocuments

public NumberOfDocuments(int value)
构造具有给定整数值的新 NumberOfDocuments 属性。

参数:
value - 整数值。
抛出:
IllegalArgumentException - (未检查的异常)如果 value 小于 0,则抛出该异常。
方法详细信息

equals

public boolean equals(Object object)
返回此文档数属性是否等效于传入的对象。若要等效,以下所有条件都必须为 true:
  1. object 不为 null。
  2. object 为 NumberOfDocuments 类的实例。
  3. 此文档数属性值与 object 的值相等。

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

getCategory

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

对于 NumberOfDocuments 类,类别为 NumberOfDocuments 类本身。

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

getName

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

对于 NumberOfDocuments 类,类别名称为 "number-of-documents"

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

JavaTM 2 Platform
Standard Ed. 6

提交错误或意见

版权所有 2008 Sun Microsystems, Inc. 保留所有权利。请遵守GNU General Public License, version 2 only