KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > javax > print > attribute > HashPrintJobAttributeSet


1 /*
2  * @(#)HashPrintJobAttributeSet.java 1.6 03/12/19
3  *
4  * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
5  * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
6  */

7
8
9 package javax.print.attribute;
10
11 import java.io.Serializable JavaDoc;
12
13 /**
14  * Class HashPrintJobAttributeSet provides an attribute set
15  * which inherits its implementation from class {@link HashAttributeSet
16  * HashAttributeSet} and enforces the semantic restrictions of interface
17  * {@link PrintJobAttributeSet PrintJobAttributeSet}.
18  * <P>
19  *
20  * @author Alan Kaminsky
21  */

22 public class HashPrintJobAttributeSet extends HashAttributeSet JavaDoc
23     implements PrintJobAttributeSet JavaDoc, Serializable JavaDoc {
24
25     private static final long serialVersionUID = -4204473656070350348L;
26
27     /**
28      * Construct a new, empty hash print job attribute set.
29      */

30     public HashPrintJobAttributeSet() {
31     super(PrintJobAttribute JavaDoc.class);
32     }
33
34     /**
35      * Construct a new hash print job attribute set,
36      * initially populated with the given value.
37      *
38      * @param attribute Attribute value to add to the set.
39      *
40      * @exception NullPointerException
41      * (unchecked exception) Thrown if <CODE>attribute</CODE> is null.
42      */

43     public HashPrintJobAttributeSet(PrintJobAttribute JavaDoc attribute) {
44     super(attribute, PrintJobAttribute JavaDoc.class);
45     }
46     
47     /**
48      * Construct a new hash print job attribute set,
49      * initially populated with the values from the given array.
50      * The new attribute set is populated
51      * by adding the elements of <CODE>attributes</CODE> array to the set in
52      * sequence, starting at index 0. Thus, later array elements may replace
53      * earlier array elements if the array contains duplicate attribute
54      * values or attribute categories.
55      *
56      * @param attributes Array of attribute values to add to the set.
57      * If null, an empty attribute set is constructed.
58      *
59      * @exception NullPointerException (unchecked exception)
60      * Thrown if any element of <CODE>attributes</CODE> is null.
61      */

62     public HashPrintJobAttributeSet(PrintJobAttribute JavaDoc[] attributes) {
63     super (attributes, PrintJobAttribute JavaDoc.class);
64     }
65  
66     /**
67      * Construct a new attribute set, initially populated with the
68      * values from the given set where the members of the attribute set
69      * are restricted to the <code>PrintJobAttribute</code> interface.
70      *
71      * @param attributes set of attribute values to initialise the set. If
72      * null, an empty attribute set is constructed.
73      *
74      * @exception ClassCastException
75      * (unchecked exception) Thrown if any element of
76      * <CODE>attributes</CODE> is not an instance of
77      * <CODE>PrintJobAttribute</CODE>.
78      */

79     public HashPrintJobAttributeSet(PrintJobAttributeSet JavaDoc attributes) {
80     super(attributes, PrintJobAttribute JavaDoc.class);
81     }
82 }
83
Popular Tags