javax.print.attribute.standard
Class DocumentName

java.lang.Object
  extended by javax.print.attribute.TextSyntax
      extended by javax.print.attribute.standard.DocumentName
All Implemented Interfaces:
Serializable, Cloneable, Attribute, DocAttribute

public final class DocumentName
extends TextSyntax
implements DocAttribute

The DocumentName printing attribute specifies a document name.

The document name may be different than the name of the job. It must not be unique across multiple documents in the same print job. Normally, an application provides the document name for the user by using e.g. the file name or a name generated automatically by the application.

IPP Compatibility: DocumentName is an IPP 1.1 attribute.

See Also:
JobName, Serialized Form

Constructor Summary
DocumentName(String documentName, Locale locale)
          Creates a DocumentName 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.TextSyntax
getLocale, getValue, hashCode, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DocumentName

public DocumentName(String documentName,
                    Locale locale)
Creates a DocumentName object.

Parameters:
documentName - the document name
locale - the locale to use, if null the default locale is used.
Throws:
NullPointerException - if documentName is null
Method Detail

equals

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

Overrides:
equals in class TextSyntax
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 DocumentName itself.

getName

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

Specified by:
getName in interface Attribute
Returns:
The name "document-name".