javax.print.attribute.standard
public final class JobStateReasons extends HashSet<JobStateReason> implements PrintJobAttribute
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.
JobState
,
JobStateReason
,
Serialized FormConstructor and Description |
---|
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. |
Modifier and Type | Method and Description |
---|---|
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.
|
clear, clone, contains, isEmpty, iterator, remove, size
equals, hashCode, removeAll
addAll, containsAll, retainAll, toArray, toArray, toString
public JobStateReasons()
JobStateReasons
attribute.public JobStateReasons(int initialCapacity, float loadFactor)
JobStateReasons
attribute
with the given initial capacity and load factor.initialCapacity
- the intial capacity.loadFactor
- the load factor of the underlying HashSet.IllegalArgumentException
- if initialCapacity < 0IllegalArgumentException
- if initialCapacity or loadFactor < 0public JobStateReasons(int initialCapacity)
JobStateReasons
attribute
with the given initial capacity and the default load factor.initialCapacity
- the intial capacity.IllegalArgumentException
- if initialCapacity < 0public JobStateReasons(Collection<JobStateReason> collection)
JobStateReasons
attribute
with the content of the given collection.collection
- the collection for the initial values.NullPointerException
- if collection or any value is
null
.ClassCastException
- if values of collection are not of type
JobStateReason
.public boolean add(JobStateReason o)
add
in interface Collection<JobStateReason>
add
in interface Set<JobStateReason>
add
in class HashSet<JobStateReason>
o
- the reason of type JobStateReason
.true
if set changed, false
otherwise.NullPointerException
- if given object is null
.ClassCastException
- if given object is not an instance of
JobStateReason
.public Class<? extends Attribute> getCategory()
getCategory
in interface Attribute
JobStateReasons
itself.