1 |
/* DocAttributeSet.java -- |
/* DocAttributeSet.java -- |
2 |
Copyright (C) 2003 Free Software Foundation, Inc. |
Copyright (C) 2003, 2005 Free Software Foundation, Inc. |
3 |
|
|
4 |
This file is part of GNU Classpath. |
This file is part of GNU Classpath. |
5 |
|
|
38 |
package javax.print.attribute; |
package javax.print.attribute; |
39 |
|
|
40 |
/** |
/** |
41 |
* @author Michael Koch |
* <code>DocAttributeSet</code> specifies an attribute set which only |
42 |
|
* allows printing attributes of type |
43 |
|
* {@link javax.print.attribute.DocAttribute}. |
44 |
|
* <p> |
45 |
|
* The methods {@link #add(Attribute)} and {@link #addAll(AttributeSet)} are |
46 |
|
* respecified in this interface to indicate that only |
47 |
|
* <code>DocAttribute</code> instances are allowed in this set. |
48 |
|
* </p> |
49 |
|
* |
50 |
|
* @author Michael Koch (konqueror@gmx.de) |
51 |
*/ |
*/ |
52 |
public interface DocAttributeSet extends AttributeSet |
public interface DocAttributeSet extends AttributeSet |
53 |
{ |
{ |
54 |
/** |
/** |
55 |
* Adds the specified attribute value to this attribute set |
* Adds the specified attribute value to this attribute set |
56 |
* if it is not already present. |
* if it is not already present. |
57 |
|
* |
58 |
|
* This operation removes any existing attribute of the same category |
59 |
|
* before adding the given attribute. |
60 |
|
* |
61 |
|
* @param attribute the attribute to add. |
62 |
|
* @return <code>true</code> if the set is changed, false otherwise. |
63 |
|
* @throws ClassCastException if attribute is not of type |
64 |
|
* <code>DocAttribute</code>. |
65 |
|
* @throws NullPointerException if the attribute is <code>null</code>. |
66 |
|
* @throws UnmodifiableSetException if the set does not support modification. |
67 |
*/ |
*/ |
68 |
boolean add (Attribute attribute); |
boolean add (Attribute attribute); |
69 |
|
|
70 |
/** |
/** |
71 |
* Adds all of the elements in the specified set to this attribute. |
* Adds all of the elements in the specified set to this attribute set. |
72 |
|
* |
73 |
|
* @param attributes the set of attributes to add. |
74 |
|
* @return <code>true</code> if the set is changed, false otherwise. |
75 |
|
* @throws ClassCastException if one of the attributes is not of type |
76 |
|
* <code>DocAttribute</code>. |
77 |
|
* @throws UnmodifiableSetException if the set does not support modification. |
78 |
|
* |
79 |
|
* @see #add(Attribute) |
80 |
*/ |
*/ |
81 |
boolean addAll (AttributeSet attributes); |
boolean addAll (AttributeSet attributes); |
82 |
} |
} |