javax.print.attribute.standard
Class NumberOfDocuments

java.lang.Object
  extended by javax.print.attribute.IntegerSyntax
      extended by javax.print.attribute.standard.NumberOfDocuments
All Implemented Interfaces:
Serializable, Cloneable, Attribute, PrintJobAttribute

public final class NumberOfDocuments
extends IntegerSyntax
implements PrintJobAttribute

The NumberOfDocuments printing attribute specifies the number of documents in a job.

IPP Compatibility: NumberOfDocuments is an IPP 1.1 attribute.

See Also:
Serialized Form

Constructor Summary
NumberOfDocuments(int value)
          Creates a NumberOfDocuments object.
 
Method Summary
 boolean equals(Object obj)
          Tests if the given object is equal to this object.
 Class<? extends Attribute> getCategory()
          Returns category of this class.
 String getName()
          Returns the name of this attribute.
 
Methods inherited from class javax.print.attribute.IntegerSyntax
getValue, hashCode, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

NumberOfDocuments

public NumberOfDocuments(int value)
Creates a NumberOfDocuments object.

Parameters:
value - the number of documents
Throws:
IllegalArgumentException - if value < 0
Method Detail

equals

public boolean equals(Object obj)
Tests if the given object is equal to this object.

Overrides:
equals in class IntegerSyntax
Parameters:
obj - the object to test
Returns:
true if both objects are equal, false otherwise.
See Also:
Object.hashCode()

getCategory

public Class<? extends Attribute> getCategory()
Returns category of this class.

Specified by:
getCategory in interface Attribute
Returns:
The class NumberOfDocuments itself.

getName

public String getName()
Returns the name of this attribute.

Specified by:
getName in interface Attribute
Returns:
The name "number-of-documents".