src/share/classes/javax/print/attribute/standard/PagesPerMinute.java

Print this page


   1 /*
   2  * Copyright (c) 2000, 2004, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.  Oracle designates this
   8  * particular file as subject to the "Classpath" exception as provided
   9  * by Oracle in the LICENSE file that accompanied this code.
  10  *
  11  * This code is distributed in the hope that it will be useful, but WITHOUT
  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any
  23  * questions.
  24  */
  25 package javax.print.attribute.standard;
  26 
  27 import javax.print.attribute.Attribute;
  28 import javax.print.attribute.IntegerSyntax;
  29 import javax.print.attribute.PrintServiceAttribute;
  30 
  31 /**
  32  * Class PagesPerMinute is an integer valued printing attribute that indicates
  33  * the nominal number of pages per minute to the nearest whole number which may
  34  * be generated by this printer (e.g., simplex, black-and-white). This attribute
  35  * is informative, not a service guarantee. Generally, it is the value used in
  36  * the marketing literature to describe the device. A value of 0 indicates a
  37  * device that takes more than two minutes to process a page.
  38  * <P>
  39  * <B>IPP Compatibility:</B> The integer value gives the IPP integer value. The
  40  * category name returned by <CODE>getName()</CODE> gives the IPP attribute
  41  * name.
  42  * <P>
  43  *
  44  * @author  Alan Kaminsky
  45  */
  46 public final class PagesPerMinute extends IntegerSyntax
  47         implements PrintServiceAttribute {
  48 
  49     private static final long serialVersionUID = -6366403993072862015L;
  50 
  51     /**
  52      * Construct a new pages per minute attribute with the given integer
  53      * value.
  54      *
  55      * @param  value  Integer value.
  56      *
  57      * @exception  IllegalArgumentException
  58      *   (Unchecked exception) Thrown if <CODE>value</CODE> is less than 0.
  59      */
  60     public PagesPerMinute(int value) {
  61         super(value, 0, Integer.MAX_VALUE);
  62     }


   1 /*
   2  * Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.  Oracle designates this
   8  * particular file as subject to the "Classpath" exception as provided
   9  * by Oracle in the LICENSE file that accompanied this code.
  10  *
  11  * This code is distributed in the hope that it will be useful, but WITHOUT
  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any
  23  * questions.
  24  */
  25 package javax.print.attribute.standard;
  26 
  27 import javax.print.attribute.Attribute;
  28 import javax.print.attribute.IntegerSyntax;
  29 import javax.print.attribute.PrintServiceAttribute;
  30 
  31 /**
  32  * Class PagesPerMinute is an integer valued printing attribute that indicates
  33  * the nominal number of pages per minute to the nearest whole number which may
  34  * be generated by this printer (e.g., simplex, black-and-white). This attribute
  35  * is informative, not a service guarantee. Generally, it is the value used in
  36  * the marketing literature to describe the device. A value of 0 indicates a
  37  * device that takes more than two minutes to process a page.
  38  * <P>
  39  * <B>IPP Compatibility:</B> The integer value gives the IPP integer value. The
  40  * category name returned by <CODE>getName()</CODE> gives the IPP attribute
  41  * name.

  42  *
  43  * @author  Alan Kaminsky
  44  */
  45 public final class PagesPerMinute extends IntegerSyntax
  46         implements PrintServiceAttribute {
  47 
  48     private static final long serialVersionUID = -6366403993072862015L;
  49 
  50     /**
  51      * Construct a new pages per minute attribute with the given integer
  52      * value.
  53      *
  54      * @param  value  Integer value.
  55      *
  56      * @exception  IllegalArgumentException
  57      *   (Unchecked exception) Thrown if <CODE>value</CODE> is less than 0.
  58      */
  59     public PagesPerMinute(int value) {
  60         super(value, 0, Integer.MAX_VALUE);
  61     }