This documentation differs from the official API. Jadeite adds extra features to the API including: variable font sizes, constructions examples, placeholders for classes and methods, and auto-generated “See Also” links. Additionally it is missing some items found in standard Javadoc documentation, including: generics type information, “Deprecated” tags and comments, “See Also” links, along with other minor differences. Please send any questions or feedback to bam@cs.cmu.edu.


javax.print.attribute.standard
class JobStateReasons

java.lang.Object extended by java.util.AbstractCollection extended by java.util.AbstractSet extended by java.util.HashSet extended by javax.print.attribute.standard.JobStateReasons
All Implemented Interfaces:
Serializable, Cloneable, Collection, Set, PrintJobAttribute

public final class JobStateReasons
extends HashSet
implements PrintJobAttribute

Class JobStateReasons is a printing attribute class, a set of enumeration values, that provides additional information about the job's current state, i.e., information that augments the value of the job's {@link JobState JobState} attribute.

Instances of {@link JobStateReason JobStateReason} do not appear in a Print Job's attribute set directly. Rather, a JobStateReasons attribute appears in the Print Job's attribute set. The JobStateReasons attribute contains zero, one, or more than one {@link JobStateReason JobStateReason} objects which pertain to the Print Job's status. The printer adds a {@link JobStateReason JobStateReason} object to the Print Job's JobStateReasons attribute when the corresponding condition becomes true of the Print Job, and the printer removes the {@link JobStateReason JobStateReason} object again when the corresponding condition becomes false, regardless of whether the Print Job's overall {@link JobState JobState} also changed.

Class JobStateReasons inherits its implementation from class {@link java.util.HashSet java.util.HashSet}. Unlike most printing attributes which are immutable once constructed, class JobStateReasons is designed to be mutable; you can add {@link JobStateReason JobStateReason} objects to an existing JobStateReasons object and remove them again. However, like class {@link java.util.HashSet java.util.HashSet}, class JobStateReasons is not multiple thread safe. If a JobStateReasons object will be used by multiple threads, be sure to synchronize its operations (e.g., using a synchronized set view obtained from class {@link java.util.Collections java.util.Collections}).

IPP Compatibility: The string value returned by each individual {@link JobStateReason JobStateReason} object's toString() method gives the IPP keyword value. The category name returned by getName() gives the IPP attribute name.


Constructor Summary

          Construct a new, empty job state reasons attribute; the underlying hash set has the default initial capacity and load factor.

          Construct a new job state reasons attribute that contains the same javax.print.attribute.standard.JobStateReason objects as the given collection.
JobStateReasons(int initialCapacity)

          Construct a new, empty job state reasons attribute; the underlying hash set has the given initial capacity and the default load factor.
JobStateReasons(int initialCapacity, float loadFactor)

          Construct a new, empty job state reasons attribute; the underlying hash set has the given initial capacity and load factor.
 
Method Summary
 boolean

          Adds the specified element to this job state reasons attribute if it is not already present.
 Class

          Get the printing attribute class which is to be used as the "category" for this printing attribute value.
 String

          Get the name of the category of which this attribute value is an instance.
 
Methods inherited from class java.util.HashSet
add, clear, clone, contains, isEmpty, iterator, remove, size
 
Methods inherited from class java.util.AbstractSet
equals, hashCode, removeAll
 
Methods inherited from class java.util.AbstractCollection
add, addAll, clear, contains, containsAll, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JobStateReasons

public JobStateReasons()
Construct a new, empty job state reasons attribute; the underlying hash set has the default initial capacity and load factor.


JobStateReasons

public JobStateReasons(Collection collection)
Construct a new job state reasons attribute that contains the same {@link JobStateReason JobStateReason} objects as the given collection. The underlying hash set's initial capacity and load factor are as specified in the superclass constructor {@link java.util.HashSet#HashSet(java.util.Collection) HashSet(Collection)}.

Parameters:
collection - Collection to copy.

JobStateReasons

public JobStateReasons(int initialCapacity)
Construct a new, empty job state reasons attribute; the underlying hash set has the given initial capacity and the default load factor.

Parameters:
initialCapacity - Initial capacity.

JobStateReasons

public JobStateReasons(int initialCapacity,
                       float loadFactor)
Construct a new, empty job state reasons attribute; the underlying hash set has the given initial capacity and load factor.

Parameters:
initialCapacity - Initial capacity.
loadFactor - Load factor.
Method Detail

add

public boolean add(JobStateReason o)
Adds the specified element to this job state reasons attribute if it is not already present. The element to be added must be an instance of class {@link JobStateReason JobStateReason}. If this job state reasons attribute already contains the specified element, the call leaves this job state reasons attribute unchanged and returns false.

Overrides:
add in class HashSet
Parameters:
o - Element to be added to this job state reasons attribute.
Returns:
true if this job state reasons attribute did not already contain the specified element.

getCategory

public final Class getCategory()
Get the printing attribute class which is to be used as the "category" for this printing attribute value.

For class JobStateReasons, the category is class JobStateReasons itself.

Returns:
Printing attribute class (category), an instance of class {@link java.lang.Class java.lang.Class}.

getName

public final String getName()
Get the name of the category of which this attribute value is an instance.

For class JobStateReasons, the category name is "job-state-reasons".

Returns:
Attribute category name.


This documentation differs from the official API. Jadeite adds extra features to the API including: variable font sizes, constructions examples, placeholders for classes and methods, and auto-generated “See Also” links. Additionally it is missing some items found in standard Javadoc documentation, including: generics type information, “Deprecated” tags and comments, “See Also” links, along with other minor differences. Please send any questions or feedback to bam@cs.cmu.edu.
This page displays the Jadeite version of the documention, which is derived from the offical documentation that contains this copyright notice:
Copyright 2008 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.
The official Sun™ documentation can be found here at http://java.sun.com/javase/6/docs/api/.