< prev index next >

src/java.desktop/share/classes/javax/print/attribute/standard/JobImpressions.java

Print this page




  46  * JobImpressions attribute either right at job submission time or at any later
  47  * point in time.
  48  * <P>
  49  * As with {@link JobKOctets JobKOctets}, the JobImpressions value must not
  50  * include the multiplicative factors contributed by the number of copies
  51  * specified by the {@link Copies Copies} attribute, independent of whether the
  52  * device can process multiple copies without making multiple passes over the
  53  * job or document data and independent of whether the output is collated or
  54  * not. Thus the value is independent of the implementation and reflects the
  55  * size of the document(s) measured in impressions independent of the number of
  56  * copies.
  57  * <P>
  58  * As with {@link JobKOctets JobKOctets}, the JobImpressions value must also not
  59  * include the multiplicative factor due to a copies instruction embedded in the
  60  * document data. If the document data actually includes replications of the
  61  * document data, this value will include such replication. In other words, this
  62  * value is always the number of impressions in the source document data, rather
  63  * than a measure of the number of impressions to be produced by the job.
  64  * <P>
  65  * <B>IPP Compatibility:</B> The integer value gives the IPP integer value. The
  66  * category name returned by <CODE>getName()</CODE> gives the IPP attribute
  67  * name.
  68  *
  69  * @see JobImpressionsSupported
  70  * @see JobImpressionsCompleted
  71  * @see JobKOctets
  72  * @see JobMediaSheets
  73  *
  74  * @author  Alan Kaminsky
  75  */
  76 public final class JobImpressions extends IntegerSyntax
  77     implements PrintRequestAttribute, PrintJobAttribute {
  78 
  79     private static final long serialVersionUID = 8225537206784322464L;
  80 
  81 
  82     /**
  83      * Construct a new job impressions attribute with the given integer value.
  84      *
  85      * @param  value  Integer value.
  86      *
  87      * @exception  IllegalArgumentException
  88      *  (Unchecked exception) Thrown if <CODE>value</CODE> is less than 0.
  89      */
  90     public JobImpressions(int value) {
  91         super(value, 0, Integer.MAX_VALUE);
  92     }
  93 
  94     /**
  95      * Returns whether this job impressions attribute is equivalent to the
  96      * passed in object. To be equivalent, all of the following conditions must
  97      * be true:
  98      * <OL TYPE=1>
  99      * <LI>
 100      * <CODE>object</CODE> is not null.
 101      * <LI>
 102      * <CODE>object</CODE> is an instance of class JobImpressions.
 103      * <LI>
 104      * This job impressions attribute's value and <CODE>object</CODE>'s value
 105      * are equal.
 106      * </OL>
 107      *
 108      * @param  object  Object to compare to.
 109      *
 110      * @return  True if <CODE>object</CODE> is equivalent to this job
 111      *          impressions attribute, false otherwise.
 112      */
 113     public boolean equals(Object object) {
 114         return super.equals (object) && object instanceof JobImpressions;
 115     }
 116 
 117     /**
 118      * Get the printing attribute class which is to be used as the "category"
 119      * for this printing attribute value.
 120      * <P>
 121      * For class JobImpressions, the category is class JobImpressions itself.
 122      *
 123      * @return  Printing attribute class (category), an instance of class
 124      *          {@link java.lang.Class java.lang.Class}.
 125      */
 126     public final Class<? extends Attribute> getCategory() {
 127         return JobImpressions.class;
 128     }
 129 
 130     /**
 131      * Get the name of the category of which this attribute value is an
 132      * instance.
 133      * <P>
 134      * For class JobImpressions, the category name is
 135      * <CODE>"job-impressions"</CODE>.
 136      *
 137      * @return  Attribute category name.
 138      */
 139     public final String getName() {
 140         return "job-impressions";
 141     }
 142 
 143 }


  46  * JobImpressions attribute either right at job submission time or at any later
  47  * point in time.
  48  * <P>
  49  * As with {@link JobKOctets JobKOctets}, the JobImpressions value must not
  50  * include the multiplicative factors contributed by the number of copies
  51  * specified by the {@link Copies Copies} attribute, independent of whether the
  52  * device can process multiple copies without making multiple passes over the
  53  * job or document data and independent of whether the output is collated or
  54  * not. Thus the value is independent of the implementation and reflects the
  55  * size of the document(s) measured in impressions independent of the number of
  56  * copies.
  57  * <P>
  58  * As with {@link JobKOctets JobKOctets}, the JobImpressions value must also not
  59  * include the multiplicative factor due to a copies instruction embedded in the
  60  * document data. If the document data actually includes replications of the
  61  * document data, this value will include such replication. In other words, this
  62  * value is always the number of impressions in the source document data, rather
  63  * than a measure of the number of impressions to be produced by the job.
  64  * <P>
  65  * <B>IPP Compatibility:</B> The integer value gives the IPP integer value. The
  66  * category name returned by {@code getName()} gives the IPP attribute
  67  * name.
  68  *
  69  * @see JobImpressionsSupported
  70  * @see JobImpressionsCompleted
  71  * @see JobKOctets
  72  * @see JobMediaSheets
  73  *
  74  * @author  Alan Kaminsky
  75  */
  76 public final class JobImpressions extends IntegerSyntax
  77     implements PrintRequestAttribute, PrintJobAttribute {
  78 
  79     private static final long serialVersionUID = 8225537206784322464L;
  80 
  81 
  82     /**
  83      * Construct a new job impressions attribute with the given integer value.
  84      *
  85      * @param  value  Integer value.
  86      *
  87      * @exception  IllegalArgumentException
  88      *  (Unchecked exception) Thrown if {@code value} is less than 0.
  89      */
  90     public JobImpressions(int value) {
  91         super(value, 0, Integer.MAX_VALUE);
  92     }
  93 
  94     /**
  95      * Returns whether this job impressions attribute is equivalent to the
  96      * passed in object. To be equivalent, all of the following conditions must
  97      * be true:
  98      * <OL TYPE=1>
  99      * <LI>
 100      * {@code object} is not null.
 101      * <LI>
 102      * {@code object} is an instance of class JobImpressions.
 103      * <LI>
 104      * This job impressions attribute's value and {@code object}'s value
 105      * are equal.
 106      * </OL>
 107      *
 108      * @param  object  Object to compare to.
 109      *
 110      * @return  True if {@code object} is equivalent to this job
 111      *          impressions attribute, false otherwise.
 112      */
 113     public boolean equals(Object object) {
 114         return super.equals (object) && object instanceof JobImpressions;
 115     }
 116 
 117     /**
 118      * Get the printing attribute class which is to be used as the "category"
 119      * for this printing attribute value.
 120      * <P>
 121      * For class JobImpressions, the category is class JobImpressions itself.
 122      *
 123      * @return  Printing attribute class (category), an instance of class
 124      *          {@link java.lang.Class java.lang.Class}.
 125      */
 126     public final Class<? extends Attribute> getCategory() {
 127         return JobImpressions.class;
 128     }
 129 
 130     /**
 131      * Get the name of the category of which this attribute value is an
 132      * instance.
 133      * <P>
 134      * For class JobImpressions, the category name is
 135      * {@code "job-impressions"}.
 136      *
 137      * @return  Attribute category name.
 138      */
 139     public final String getName() {
 140         return "job-impressions";
 141     }
 142 
 143 }
< prev index next >