javax.print.attribute.standard
Class JobStateReasons

java.lang.Object
  extended by java.util.AbstractCollection<E>
      extended by java.util.AbstractSet<T>
          extended by java.util.HashSet<JobStateReason>
              extended by javax.print.attribute.standard.JobStateReasons
All Implemented Interfaces:
Serializable, Cloneable, Iterable<JobStateReason>, Collection<JobStateReason>, Set<JobStateReason>, Attribute, PrintJobAttribute

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, JobStateReason, Serialized Form

Constructor Summary
JobStateReasons()
          Constructs an empty JobStateReasons attribute.
JobStateReasons(Collection<JobStateReason> collection)
          Constructs a JobStateReasons attribute with the content of the given collection.
JobStateReasons(int initialCapacity)
          Constructs an empty JobStateReasons attribute with the given initial capacity and the default load factor.
JobStateReasons(int initialCapacity, float loadFactor)
          Constructs an empty JobStateReasons attribute with the given initial capacity and load factor.
 
Method Summary
 boolean add(JobStateReason o)
          Adds the given job state reason object to the set.
 Class<? extends Attribute> getCategory()
          Returns category of this class.
 String getName()
          Returns the name of this attribute.
 
Methods inherited from class java.util.HashSet
clear, clone, contains, isEmpty, iterator, remove, size
 
Methods inherited from class java.util.AbstractSet
equals, hashCode, removeAll
 
Methods inherited from class java.util.AbstractCollection
addAll, containsAll, retainAll, toArray, toArray, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Set
addAll, containsAll, equals, hashCode, removeAll, retainAll, toArray, toArray
 

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.

Specified by:
add in interface Collection<JobStateReason>
Specified by:
add in interface Set<JobStateReason>
Overrides:
add in class HashSet<JobStateReason>
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.

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

getName

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

Specified by:
getName in interface Attribute
Returns:
The name "job-state-reasons".