JavaTM Platform
Standard Ed. 6

javax.print.attribute.standard
类 CopiesSupported

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

public final class CopiesSupported
extends SetOfIntegerSyntax
implements SupportedValuesAttribute

CopiesSupported 类是打印属性类,它是一个整数集,给出了支持的 Copies 属性的值。它限制为单个连续的整数范围,不允许存在多个非重叠范围。

IPP Compatibility: CopiesSupported 属性的规范数组形式给出了要包含于 IPP "copies-supported" 属性中的副本范围的下边界和上边界。有关规范数组形式的解释,请参见 SetOfIntegerSyntaxgetName() 所返回的类别名称给出了 IPP 属性名称。

另请参见:
序列化表格

构造方法摘要
CopiesSupported(int member)
          构造一个新的支持副本的属性,它包含单个整数。
CopiesSupported(int lowerBound, int upperBound)
          构造一个新的支持副本的属性,它包含一个整数范围。
 
方法摘要
 boolean equals(Object object)
          返回支持副本的此属性是否等于传入的对象。
 Class<? extends Attribute> getCategory()
          获取将被用作此打印属性值的“类别”的打印属性类。
 String getName()
          获取类别名称,这里此属性值是该类别的实例。
 
从类 javax.print.attribute.SetOfIntegerSyntax 继承的方法
contains, contains, getMembers, hashCode, next, toString
 
从类 java.lang.Object 继承的方法
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

构造方法详细信息

CopiesSupported

public CopiesSupported(int member)
构造一个新的支持副本的属性,它包含单个整数。即仅支持 Copies 的某个值。

参数:
member - 集合成员。
抛出:
IllegalArgumentException - (未检查的异常)如果 member 小于 1,则抛出此异常。

CopiesSupported

public CopiesSupported(int lowerBound,
                       int upperBound)
构造一个新的支持副本的属性,它包含一个整数范围。即仅支持某个范围内的 Copies 值。

参数:
lowerBound - 范围的下边界。
upperBound - 范围的上边界。
抛出:
IllegalArgumentException - (未检查的异常)如果指定了 null 范围,或指定了 lowerBound 小于 1 的非 null 范围,则抛出此异常。
方法详细信息

equals

public boolean equals(Object object)
返回支持副本的此属性是否等于传入的对象。若要相等,以下所有条件都必须为 true:
  1. object 不为 null。
  2. object 为 CopiesSupported 类的实例。
  3. 支持副本的此属性的成员与 object 的成员不相同。

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

getCategory

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

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

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

getName

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

对于 CopiesSupported 类,类别名称为 "copies-supported"

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

JavaTM Platform
Standard Ed. 6

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

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