aboutsummaryrefslogtreecommitdiff
path: root/libjava/classpath/javax/print/attribute/PrintRequestAttributeSet.java
diff options
context:
space:
mode:
Diffstat (limited to 'libjava/classpath/javax/print/attribute/PrintRequestAttributeSet.java')
-rw-r--r--libjava/classpath/javax/print/attribute/PrintRequestAttributeSet.java35
1 files changed, 31 insertions, 4 deletions
diff --git a/libjava/classpath/javax/print/attribute/PrintRequestAttributeSet.java b/libjava/classpath/javax/print/attribute/PrintRequestAttributeSet.java
index d72d2d71c47..350d9a644da 100644
--- a/libjava/classpath/javax/print/attribute/PrintRequestAttributeSet.java
+++ b/libjava/classpath/javax/print/attribute/PrintRequestAttributeSet.java
@@ -1,5 +1,5 @@
/* PrintRequestAttributeSet.java --
- Copyright (C) 2002 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -38,18 +38,45 @@ exception statement from your version. */
package javax.print.attribute;
/**
- * @author Michael Koch
+ * <code>PrintRequestAttributeSet</code> specifies an attribute set which only
+ * allows printing attributes of type
+ * {@link javax.print.attribute.PrintRequestAttribute}.
+ * <p>
+ * The methods {@link #add(Attribute)} and {@link #addAll(AttributeSet)} are
+ * respecified in this interface to indicate that only
+ * <code>PrintRequestAttribute</code> instances are allowed in this set.
+ * </p>
+ *
+ * @author Michael Koch (konqueror@gmx.de)
*/
public interface PrintRequestAttributeSet extends AttributeSet
{
/**
- * Adds the specified attribute value to this attribute set
+ * Adds the specified attribute value to this attribute set
* if it is not already present.
+ *
+ * This operation removes any existing attribute of the same category
+ * before adding the given attribute.
+ *
+ * @param attribute the attribute to add.
+ * @return <code>true</code> if the set is changed, false otherwise.
+ * @throws ClassCastException if attribute is not of type
+ * <code>PrintRequestAttribute</code>.
+ * @throws NullPointerException if the attribute is <code>null</code>.
+ * @throws UnmodifiableSetException if the set does not support modification.
*/
boolean add (Attribute attribute);
/**
- * 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.
+ *
+ * @param attributes the set of attributes to add.
+ * @return <code>true</code> if the set is changed, false otherwise.
+ * @throws ClassCastException if one of the attributes is not of type
+ * <code>PrintRequestAttribute</code>.
+ * @throws UnmodifiableSetException if the set does not support modification.
+ *
+ * @see #add(Attribute)
*/
boolean addAll (AttributeSet attributes);
}