KickJava   Java API By Example, From Geeks To Geeks.

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


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

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

30     public HashDocAttributeSet() {
31     super (DocAttribute JavaDoc.class);
32     }
33
34     /**
35      * Construct a new hash doc 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 HashDocAttributeSet(DocAttribute JavaDoc attribute) {
44     super (attribute, DocAttribute JavaDoc.class);
45     }
46
47     /**
48      * Construct a new hash doc attribute set,
49      * initially populated with the values from the given array.
50      * The new attribute set is populated by
51      * 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
60      * (unchecked exception)
61      * Thrown if any element of <CODE>attributes</CODE> is null.
62      */

63     public HashDocAttributeSet(DocAttribute JavaDoc[] attributes) {
64     super (attributes, DocAttribute JavaDoc.class);
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>DocAttribute</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>DocAttribute</CODE>.
79      */

80     public HashDocAttributeSet(DocAttributeSet JavaDoc attributes) {
81     super(attributes, DocAttribute JavaDoc.class);
82     }
83     
84 }
85
Popular Tags