javax.print.attribute.standard

Class JobStateReasons

public final class JobStateReasons extends HashSet<JobStateReason> implements PrintJobAttribute

The JobStateReasons attribute provides the set of additional informations available about the current state of a print job.

IPP Compatibility: JobStateReasons is an IPP 1.1 attribute.

See Also: JobState

Constructor Summary
JobStateReasons()
Constructs an empty JobStateReasons attribute.
JobStateReasons(int initialCapacity, float loadFactor)
Constructs an empty JobStateReasons attribute with the given initial capacity and load factor.
JobStateReasons(int initialCapacity)
Constructs an empty JobStateReasons attribute with the given initial capacity and the default load factor.
JobStateReasons(Collection<JobStateReason> collection)
Constructs a JobStateReasons attribute with the content of the given collection.
Method Summary
booleanadd(JobStateReason o)
Adds the given job state reason object to the set.
Class<? extends Attribute>getCategory()
Returns category of this class.
StringgetName()
Returns the name of this attribute.

Constructor Detail

JobStateReasons

public JobStateReasons()
Constructs an empty JobStateReasons attribute.

JobStateReasons

public JobStateReasons(int initialCapacity, float loadFactor)
Constructs an empty JobStateReasons attribute with the given initial capacity and load factor.

Parameters: initialCapacity the intial capacity. loadFactor the load factor of the underlying HashSet.

Throws: IllegalArgumentException if initialCapacity < 0 IllegalArgumentException if initialCapacity or loadFactor < 0

JobStateReasons

public JobStateReasons(int initialCapacity)
Constructs an empty JobStateReasons attribute with the given initial capacity and the default load factor.

Parameters: initialCapacity the intial capacity.

Throws: IllegalArgumentException if initialCapacity < 0

JobStateReasons

public JobStateReasons(Collection<JobStateReason> collection)
Constructs a JobStateReasons attribute with the content of the given collection.

Parameters: collection the collection for the initial values.

Throws: NullPointerException if collection or any value is null. ClassCastException if values of collection are not of type JobStateReason.

Method Detail

add

public boolean add(JobStateReason o)
Adds the given job state reason object to the set.

Parameters: o the reason of type JobStateReason.

Returns: true if set changed, false otherwise.

Throws: NullPointerException if given object is null. ClassCastException if given object is not an instance of JobStateReason.

getCategory

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

Returns: The class JobStateReasons itself.

getName

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

Returns: The name "job-state-reasons".