diff options
Diffstat (limited to 'libjava/classpath/javax/print/attribute/PrintServiceAttributeSet.java')
-rw-r--r-- | libjava/classpath/javax/print/attribute/PrintServiceAttributeSet.java | 35 |
1 files changed, 31 insertions, 4 deletions
diff --git a/libjava/classpath/javax/print/attribute/PrintServiceAttributeSet.java b/libjava/classpath/javax/print/attribute/PrintServiceAttributeSet.java index d67c9af55f0..fa22ee0d922 100644 --- a/libjava/classpath/javax/print/attribute/PrintServiceAttributeSet.java +++ b/libjava/classpath/javax/print/attribute/PrintServiceAttributeSet.java @@ -1,5 +1,5 @@ /* PrintServiceAttributeSet.java -- - Copyright (C) 2003 Free Software Foundation, Inc. + Copyright (C) 2003, 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>PrintServiceAttributeSet</code> specifies an attribute set which only + * allows printing attributes of type + * {@link javax.print.attribute.PrintServiceAttribute}. + * <p> + * The methods {@link #add(Attribute)} and {@link #addAll(AttributeSet)} are + * respecified in this interface to indicate that only + * <code>PrintServiceAttribute</code> instances are allowed in this set. + * </p> + * + * @author Michael Koch (konqueror@gmx.de) */ public interface PrintServiceAttributeSet 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>PrintServiceAttribute</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>PrintServiceAttribute</code>. + * @throws UnmodifiableSetException if the set does not support modification. + * + * @see #add(Attribute) */ boolean addAll (AttributeSet attributes); } |