- java.lang.Object
-
- java.util.AbstractCollection<E>
-
- java.util.AbstractSet<E>
-
- java.util.HashSet<JobStateReason>
-
- 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
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'sJobState
attribute.Instances of
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 oneJobStateReason
objects which pertain to the Print Job's status. The printer adds aJobStateReason
object to the Print Job's JobStateReasons attribute when the corresponding condition becomes true of the Print Job, and the printer removes theJobStateReason
object again when the corresponding condition becomes false, regardless of whether the Print Job's overallJobState
also changed.Class JobStateReasons inherits its implementation from class
java.util.HashSet
. Unlike most printing attributes which are immutable once constructed, class JobStateReasons is designed to be mutable; you can addJobStateReason
objects to an existing JobStateReasons object and remove them again. However, like classjava.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 classjava.util.Collections
).IPP Compatibility: The string value returned by each individual
JobStateReason
object'stoString()
method gives the IPP keyword value. The category name returned bygetName()
gives the IPP attribute name.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor and Description JobStateReasons()
Construct a new, empty job state reasons attribute; the underlying hash set has the default initial capacity and load factor.JobStateReasons(Collection<JobStateReason> collection)
Construct a new job state reasons attribute that contains the sameJobStateReason
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
Methods Modifier and Type Method and Description boolean
add(JobStateReason o)
Adds the specified element to this job state reasons attribute if it is not already present.Class<? extends Attribute>
getCategory()
Get the printing attribute class which is to be used as the "category" for this printing attribute value.String
getName()
Get the name of the category of which this attribute value is an instance.-
Methods inherited from class java.util.HashSet
clear, clone, contains, isEmpty, iterator, remove, size
-
Methods inherited from class java.util.AbstractCollection
addAll, containsAll, retainAll, toArray, toArray, toString
-
-
-
-
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(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.- Throws:
IllegalArgumentException
- if the initial capacity is less than zero.
-
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.- Throws:
IllegalArgumentException
- if the initial capacity is less than zero.
-
JobStateReasons
public JobStateReasons(Collection<JobStateReason> collection)
Construct a new job state reasons attribute that contains the sameJobStateReason
objects as the given collection. The underlying hash set's initial capacity and load factor are as specified in the superclass constructor
.HashSet(Collection)
- Parameters:
collection
- Collection to copy.- Throws:
NullPointerException
- (unchecked exception) Thrown ifcollection
is null or if any element incollection
is null.ClassCastException
- (unchecked exception) Thrown if any element incollection
is not an instance of classJobStateReason
.
-
-
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 classJobStateReason
. If this job state reasons attribute already contains the specified element, the call leaves this job state reasons attribute unchanged and returns false.- Specified by:
add
in interfaceCollection<JobStateReason>
- Specified by:
add
in interfaceSet<JobStateReason>
- Overrides:
add
in classHashSet<JobStateReason>
- 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.
- Throws:
NullPointerException
- (unchecked exception) Thrown if the specified element is null.ClassCastException
- (unchecked exception) Thrown if the specified element is not an instance of classJobStateReason
.- Since:
- 1.5
-
getCategory
public final Class<? extends Attribute> 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.
- Specified by:
getCategory
in interfaceAttribute
- Returns:
- Printing attribute class (category), an instance of class
java.lang.Class
.
-
-
Deutsche Übersetzung
Sie haben gebeten, diese Seite auf Deutsch zu besuchen. Momentan ist nur die Oberfläche übersetzt, aber noch nicht der gesamte Inhalt.Wenn Sie mir bei Übersetzungen helfen wollen, ist Ihr Beitrag willkommen. Alles, was Sie tun müssen, ist, sich auf der Website zu registrieren und mir eine Nachricht zu schicken, in der Sie gebeten werden, Sie der Gruppe der Übersetzer hinzuzufügen, die Ihnen die Möglichkeit gibt, die gewünschten Seiten zu übersetzen. Ein Link am Ende jeder übersetzten Seite zeigt an, dass Sie der Übersetzer sind und einen Link zu Ihrem Profil haben.
Vielen Dank im Voraus.
Dokument erstellt 11/06/2005, zuletzt geändert 04/03/2020
Quelle des gedruckten Dokuments:https://www.gaudry.be/de/java-api-rf-javax/print/attribute/standard/JobStateReasons.html
Die Infobro ist eine persönliche Seite, deren Inhalt in meiner alleinigen Verantwortung liegt. Der Text ist unter der CreativeCommons-Lizenz (BY-NC-SA) verfügbar. Weitere Informationen auf die Nutzungsbedingungen und dem Autor.
Referenzen
Diese Verweise und Links verweisen auf Dokumente, die während des Schreibens dieser Seite konsultiert wurden, oder die zusätzliche Informationen liefern können, aber die Autoren dieser Quellen können nicht für den Inhalt dieser Seite verantwortlich gemacht werden.
Der Autor Diese Website ist allein dafür verantwortlich, wie die verschiedenen Konzepte und Freiheiten, die mit den Nachschlagewerken gemacht werden, hier dargestellt werden. Denken Sie daran, dass Sie mehrere Quellinformationen austauschen müssen, um das Risiko von Fehlern zu reduzieren.