Path: blob/aarch64-shenandoah-jdk8u272-b10/jdk/src/share/classes/javax/print/attribute/standard/NumberOfInterveningJobs.java
38918 views
/*1* Copyright (c) 2000, 2004, Oracle and/or its affiliates. All rights reserved.2* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.3*4* This code is free software; you can redistribute it and/or modify it5* under the terms of the GNU General Public License version 2 only, as6* published by the Free Software Foundation. Oracle designates this7* particular file as subject to the "Classpath" exception as provided8* by Oracle in the LICENSE file that accompanied this code.9*10* This code is distributed in the hope that it will be useful, but WITHOUT11* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or12* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License13* version 2 for more details (a copy is included in the LICENSE file that14* accompanied this code).15*16* You should have received a copy of the GNU General Public License version17* 2 along with this work; if not, write to the Free Software Foundation,18* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.19*20* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA21* or visit www.oracle.com if you need additional information or have any22* questions.23*/24package javax.print.attribute.standard;2526import javax.print.attribute.Attribute;27import javax.print.attribute.IntegerSyntax;28import javax.print.attribute.PrintJobAttribute;2930/**31* Class NumberOfInterveningJobs is an integer valued printing attribute that32* indicates the number of jobs that are ahead of this job in the relative33* chronological order of expected time to complete (i.e., the current34* scheduled order).35* <P>36* <B>IPP Compatibility:</B> The integer value gives the IPP integer value.37* The category name returned by <CODE>getName()</CODE> gives the IPP38* attribute name.39* <P>40*41* @author Alan Kaminsky42*/43public final class NumberOfInterveningJobs extends IntegerSyntax44implements PrintJobAttribute {4546private static final long serialVersionUID = 2568141124844982746L;4748/**49* Construct a new number of intervening jobs attribute with the given50* integer value.51*52* @param value Integer value.53*54* @exception IllegalArgumentException55* (Unchecked exception) Thrown if <CODE>value</CODE> is less than 0.56*/57public NumberOfInterveningJobs(int value) {58super(value, 0, Integer.MAX_VALUE);59}6061/**62* Returns whether this number of intervening jobs attribute is equivalent63* to the passed in object. To be equivalent, all of the following64* conditions must be true:65* <OL TYPE=1>66* <LI>67* <CODE>object</CODE> is not null.68* <LI>69* <CODE>object</CODE> is an instance of class NumberOfInterveningJobs.70* <LI>71* This number of intervening jobs attribute's value and72* <CODE>object</CODE>'s value are equal.73* </OL>74*75* @param object Object to compare to.76*77* @return True if <CODE>object</CODE> is equivalent to this number of78* intervening jobs attribute, false otherwise.79*/80public boolean equals(Object object) {81return (super.equals (object) &&82object instanceof NumberOfInterveningJobs);83}8485/**86* Get the printing attribute class which is to be used as the "category"87* for this printing attribute value.88* <P>89* For class NumberOfInterveningJobs, the90* category is class NumberOfInterveningJobs itself.91*92* @return Printing attribute class (category), an instance of class93* {@link java.lang.Class java.lang.Class}.94*/95public final Class<? extends Attribute> getCategory() {96return NumberOfInterveningJobs.class;97}9899/**100* Get the name of the category of which this attribute value is an101* instance.102* <P>103* For class NumberOfInterveningJobs, the104* category name is <CODE>"number-of-intervening-jobs"</CODE>.105*106* @return Attribute category name.107*/108public final String getName() {109return "number-of-intervening-jobs";110}111112}113114115