KickJava   Java API By Example, From Geeks To Geeks.

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


1 /*
2  * @(#)HashPrintRequestAttributeSet.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 HashPrintRequestAttributeSet inherits its implementation from
15  * class {@link HashAttributeSet HashAttributeSet} and enforces the
16  * semantic restrictions of interface
17  * {@link PrintRequestAttributeSet PrintRequestAttributeSet}.
18  * <P>
19  *
20  * @author Alan Kaminsky
21  */

22 public class HashPrintRequestAttributeSet extends HashAttributeSet JavaDoc
23     implements PrintRequestAttributeSet JavaDoc, Serializable JavaDoc {
24
25     private static final long serialVersionUID = 2364756266107751933L;
26
27     /**
28      * Construct a new, empty print request attribute set.
29      */

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

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

80     public HashPrintRequestAttributeSet(PrintRequestAttributeSet JavaDoc attributes)
81     {
82     super(attributes, PrintRequestAttribute JavaDoc.class);
83     }
84     
85
86 }
87
Popular Tags