src/share/classes/javax/print/attribute/PrintJobAttributeSet.java

Print this page




  22  * or visit www.oracle.com if you need additional information or have any
  23  * questions.
  24  */
  25 
  26 
  27 package javax.print.attribute;
  28 
  29 /**
  30  * Interface PrintJobAttributeSet specifies the interface for a set of print
  31  * job attributes, i.e. printing attributes that implement interface {@link
  32  * PrintJobAttribute PrintJobAttribute}. In the Print Service API, a
  33  * service uses a PrintJobAttributeSet to report the status of a print job.
  34  * <P>
  35  * A PrintJobAttributeSet is just an {@link AttributeSet AttributeSet} whose
  36  * constructors and mutating operations guarantee an additional invariant,
  37  * namely that all attribute values in the PrintJobAttributeSet must be
  38  * instances of interface {@link PrintJobAttribute PrintJobAttribute}.
  39  * The {@link #add(Attribute) add(Attribute)}, and
  40  * {@link #addAll(AttributeSet) >addAll(AttributeSet)} operations
  41  * are respecified below to guarantee this additional invariant.
  42  * <P>
  43  *
  44  * @author  Alan Kaminsky
  45  */
  46 public interface PrintJobAttributeSet extends AttributeSet {
  47 
  48     /**
  49      * Adds the specified attribute value to this attribute set if it is not
  50      * already present, first removing any existing value in the same
  51      * attribute category as the specified attribute value (optional
  52      * operation).
  53      *
  54      * @param  attribute  Attribute value to be added to this attribute set.
  55      *
  56      * @return  <tt>true</tt> if this attribute set changed as a result of
  57      *          the call, i.e., the given attribute value was not already a
  58      *          member of this attribute set.
  59      *
  60      * @throws  UnmodifiableSetException
  61      *     (unchecked exception) Thrown if this attribute set does not
  62      *     support the <CODE>add()</CODE> operation.




  22  * or visit www.oracle.com if you need additional information or have any
  23  * questions.
  24  */
  25 
  26 
  27 package javax.print.attribute;
  28 
  29 /**
  30  * Interface PrintJobAttributeSet specifies the interface for a set of print
  31  * job attributes, i.e. printing attributes that implement interface {@link
  32  * PrintJobAttribute PrintJobAttribute}. In the Print Service API, a
  33  * service uses a PrintJobAttributeSet to report the status of a print job.
  34  * <P>
  35  * A PrintJobAttributeSet is just an {@link AttributeSet AttributeSet} whose
  36  * constructors and mutating operations guarantee an additional invariant,
  37  * namely that all attribute values in the PrintJobAttributeSet must be
  38  * instances of interface {@link PrintJobAttribute PrintJobAttribute}.
  39  * The {@link #add(Attribute) add(Attribute)}, and
  40  * {@link #addAll(AttributeSet) >addAll(AttributeSet)} operations
  41  * are respecified below to guarantee this additional invariant.

  42  *
  43  * @author  Alan Kaminsky
  44  */
  45 public interface PrintJobAttributeSet extends AttributeSet {
  46 
  47     /**
  48      * Adds the specified attribute value to this attribute set if it is not
  49      * already present, first removing any existing value in the same
  50      * attribute category as the specified attribute value (optional
  51      * operation).
  52      *
  53      * @param  attribute  Attribute value to be added to this attribute set.
  54      *
  55      * @return  <tt>true</tt> if this attribute set changed as a result of
  56      *          the call, i.e., the given attribute value was not already a
  57      *          member of this attribute set.
  58      *
  59      * @throws  UnmodifiableSetException
  60      *     (unchecked exception) Thrown if this attribute set does not
  61      *     support the <CODE>add()</CODE> operation.