summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWolfgang Baer <WBaer@gmx.de>2005-11-13 10:03:05 +0000
committerWolfgang Baer <WBaer@gmx.de>2005-11-13 10:03:05 +0000
commit6427b2a614624901de091361243ba956fb603a70 (patch)
tree6f588c7ef571aa864d15043eb7cf994ef31637be
parentc7e3736cacbfef5a510a09d6043a39e8acc17bda (diff)
downloadclasspath-6427b2a614624901de091361243ba956fb603a70.tar.gz
2005-11-12 Wolfgang Baer <WBaer@gmx.de>
* javax/print/attribute/Attribute.java, javax/print/attribute/AttributeSet.java, javax/print/attribute/DocAttribute.java, javax/print/attribute/DocAttributeSet.java, javax/print/attribute/PrintJobAttribute.java, javax/print/attribute/PrintJobAttributeSet.java, javax/print/attribute/PrintRequestAttribute.java, javax/print/attribute/PrintRequestAttributeSet.java, javax/print/attribute/PrintServiceAttribute.java, javax/print/attribute/PrintServiceAttributeSet.java, javax/print/attribute/SupportedValuesAttribute.java, javax/print/attribute/UnmodifiableSetException.java: Added api documentation to class and method definitions. * javax/print/attribute/package.html: Included a package description.
-rw-r--r--ChangeLog17
-rw-r--r--javax/print/attribute/Attribute.java20
-rw-r--r--javax/print/attribute/AttributeSet.java147
-rw-r--r--javax/print/attribute/DocAttribute.java19
-rw-r--r--javax/print/attribute/DocAttributeSet.java35
-rw-r--r--javax/print/attribute/PrintJobAttribute.java19
-rw-r--r--javax/print/attribute/PrintJobAttributeSet.java35
-rw-r--r--javax/print/attribute/PrintRequestAttribute.java14
-rw-r--r--javax/print/attribute/PrintRequestAttributeSet.java35
-rw-r--r--javax/print/attribute/PrintServiceAttribute.java19
-rw-r--r--javax/print/attribute/PrintServiceAttributeSet.java35
-rw-r--r--javax/print/attribute/SupportedValuesAttribute.java20
-rw-r--r--javax/print/attribute/UnmodifiableSetException.java12
-rw-r--r--javax/print/attribute/package.html9
14 files changed, 386 insertions, 50 deletions
diff --git a/ChangeLog b/ChangeLog
index 0ac6a37d6..867fc11e2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,20 @@
+2005-11-13 Wolfgang Baer <WBaer@gmx.de>
+
+ * javax/print/attribute/Attribute.java,
+ javax/print/attribute/AttributeSet.java,
+ javax/print/attribute/DocAttribute.java,
+ javax/print/attribute/DocAttributeSet.java,
+ javax/print/attribute/PrintJobAttribute.java,
+ javax/print/attribute/PrintJobAttributeSet.java,
+ javax/print/attribute/PrintRequestAttribute.java,
+ javax/print/attribute/PrintRequestAttributeSet.java,
+ javax/print/attribute/PrintServiceAttribute.java,
+ javax/print/attribute/PrintServiceAttributeSet.java,
+ javax/print/attribute/SupportedValuesAttribute.java,
+ javax/print/attribute/UnmodifiableSetException.java:
+ Added api documentation to class and method definitions.
+ * javax/print/attribute/package.html: Included a package description.
+
2005-11-13 Audrius Meskauskas <AudriusA@Bioinformatics.org>
PR 24749
diff --git a/javax/print/attribute/Attribute.java b/javax/print/attribute/Attribute.java
index fcaa7d84c..7ce0247ce 100644
--- a/javax/print/attribute/Attribute.java
+++ b/javax/print/attribute/Attribute.java
@@ -1,5 +1,5 @@
/* Attribute.java --
- Copyright (C) 2002 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -40,11 +40,27 @@ package javax.print.attribute;
import java.io.Serializable;
/**
- * @author Michael Koch
+ * Base interface of every printing attribute of the Java Print Service API.
+ *
+ * @author Michael Koch (konqueror@gmx.de)
*/
public interface Attribute extends Serializable
{
+ /**
+ * Returns the category of the printing attribute which is the specific
+ * attribute class implementing this interface.
+ *
+ * @return The concrete {@link Class} instance of the attribute class.
+ */
Class getCategory ();
+ /**
+ * Returns the descriptive name of the attribute category.
+ *
+ * Implementations of the <code>Attribute</code> interfaces providing equal
+ * category values have to return equal name values.
+ *
+ * @return The name of the attribute category.
+ */
String getName ();
}
diff --git a/javax/print/attribute/AttributeSet.java b/javax/print/attribute/AttributeSet.java
index cdc7a8e48..b4bdecad2 100644
--- a/javax/print/attribute/AttributeSet.java
+++ b/javax/print/attribute/AttributeSet.java
@@ -1,5 +1,5 @@
/* AttributeSet.java --
- Copyright (C) 2002 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -38,40 +38,159 @@ exception statement from your version. */
package javax.print.attribute;
/**
- * @author Michael Koch
+ * <code>AttributeSet</code> is the top-level interface for sets of printing
+ * attributes in the Java Print Service API.
+ * <p>
+ * There are no duplicate values allowed in an attribute set and there is
+ * at most one attribute object contained per category type. Based on the
+ * {@link java.util.Map} interface the values of attribute sets are objects
+ * of type {@link javax.print.attribute.Attribute} and the entries are the
+ * categories as {@link java.lang.Class} instances.
+ * </p>
+ * <p>
+ * The following specialized types of <code>AttributeSet</code> are available:
+ * <ul>
+ * <li>{@link javax.print.attribute.DocAttributeSet}</li>
+ * <li>{@link javax.print.attribute.PrintRequestAttributeSet}</li>
+ * <li>{@link javax.print.attribute.PrintJobAttributeSet}</li>
+ * <li>{@link javax.print.attribute.PrintServiceAttributeSet}</li>
+ * </ul>
+ * </p>
+ * <p>
+ * Attribute sets may be unmodifiable depending on the context of usage. If
+ * used as read-only attribute set modifying operations throw an
+ * {@link javax.print.attribute.UnmodifiableSetException}.
+ * </p>
+ * <p>
+ * The Java Print Service API provides implementation classes for the existing
+ * attribute set interfaces but applications may use their own implementations.
+ * </p>
+ *
+ * @author Michael Koch (konqueror@gmx.de)
*/
public interface 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 to the set.
+ *
+ * @param attribute the attribute to add.
+ * @return <code>true</code> if the set is changed, false otherwise.
+ * @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 UnmodifiableSetException if the set does not support modification.
+ *
+ * @see #add(Attribute)
*/
boolean addAll (AttributeSet attributes);
-
+
+ /**
+ * Removes all attributes from this attribute set.
+ *
+ * @throws UnmodifiableSetException if the set does not support modification.
+ */
void clear ();
-
+
+ /**
+ * Checks if this attributes set contains an attribute with the given
+ * category.
+ *
+ * @param category the category to test for.
+ * @return <code>true</code> if an attribute of the category is contained
+ * in the set, <code>false</code> otherwise.
+ */
boolean containsKey (Class category);
-
+
+ /**
+ * Checks if this attribute set contains the given attribute.
+ *
+ * @param attribute the attribute to test for.
+ * @return <code>true</code> if the attribute is contained in the set,
+ * <code>false</code> otherwise.
+ */
boolean containsValue (Attribute attribute);
+ /**
+ * Tests this set for equality with the given object. <code>true</code> is
+ * returned, if the given object is also of type <code>AttributeSet</code>
+ * and the contained attributes are the same as in this set.
+ *
+ * @param obj the Object to test.
+ * @return <code>true</code> if equal, false otherwise.
+ */
boolean equals (Object obj);
-
- Attribute get (Class Category);
-
+
+ /**
+ * Returns the attribute object contained in this set for the given attribute
+ * category.
+ *
+ * @param category the category of the attribute. A <code>Class</code>
+ * instance of a class implementing the <code>Attribute</code> interface.
+ * @return The attribute for this category or <code>null</code> if no
+ * attribute is contained for the given category.
+ * @throws NullPointerException if category is null.
+ * @throws ClassCastException if category is not implementing
+ * <code>Attribute</code>.
+ */
+ Attribute get (Class category);
+
+ /**
+ * Returns the hashcode value. The hashcode value is the sum of all hashcodes
+ * of the attributes contained in this set.
+ *
+ * @return The hashcode for this attribute set.
+ */
int hashCode ();
-
+
+ /**
+ * Checks if the attribute set is empty.
+ *
+ * @return <code>true</code> if the attribute set is empty, false otherwise.
+ */
boolean isEmpty ();
+ /**
+ * Removes the given attribute from the set. If the given attribute is <code>null</code>
+ * nothing is done and <code>false</code> is returned.
+ *
+ * @param attribute the attribute to remove.
+ * @return <code>true</code> if removed, false in all other cases.
+ * @throws UnmodifiableSetException if the set does not support modification.
+ */
boolean remove (Attribute attribute);
-
+
+ /**
+ * Removes the attribute entry of the given category from the set. If the given
+ * category is <code>null</code> nothing is done and <code>false</code> is returned.
+ *
+ * @param category the category of the entry to be removed.
+ * @return <code>true</code> if an attribute is removed, false in all other cases.
+ * @throws UnmodifiableSetException if the set does not support modification.
+ */
boolean remove (Class category);
-
+
+ /**
+ * Returns the number of elements in this attribute set.
+ *
+ * @return The number of elements.
+ */
int size ();
-
+
+ /**
+ * Returns the content of the attribute set as an array
+ *
+ * @return An array of attributes.
+ */
Attribute[] toArray ();
}
diff --git a/javax/print/attribute/DocAttribute.java b/javax/print/attribute/DocAttribute.java
index 669d7d982..9af3a7052 100644
--- a/javax/print/attribute/DocAttribute.java
+++ b/javax/print/attribute/DocAttribute.java
@@ -1,5 +1,5 @@
/* DocAttribute.java --
- Copyright (C) 2003 Free Software Foundation, Inc.
+ Copyright (C) 2003, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -38,8 +38,23 @@ exception statement from your version. */
package javax.print.attribute;
/**
- * @author Michael Koch
+ * Marker interface for all attribute classes describing attributes of
+ * a {@link javax.print.Doc} object.
+ * <p>
+ * Instances of implementing attribute classes may be collected in a
+ * {@link javax.print.attribute.DocAttributeSet}.
+ * </p><p>
+ * Attributes attached to a {@link javax.print.Doc} instance specify how the
+ * data should be printed.
+ * For example {@link javax.print.attribute.standard.Chromaticity} can be
+ * used to specify that a doc should be printed in color or monochrome.
+ * </p>
+ *
+ * @see javax.print.attribute.DocAttributeSet
+ *
+ * @author Michael Koch (konqueror@gmx.de)
*/
public interface DocAttribute extends Attribute
{
+ // Marker interface
}
diff --git a/javax/print/attribute/DocAttributeSet.java b/javax/print/attribute/DocAttributeSet.java
index 72cd6d88a..d8d09eb48 100644
--- a/javax/print/attribute/DocAttributeSet.java
+++ b/javax/print/attribute/DocAttributeSet.java
@@ -1,5 +1,5 @@
/* DocAttributeSet.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>DocAttributeSet</code> specifies an attribute set which only
+ * allows printing attributes of type
+ * {@link javax.print.attribute.DocAttribute}.
+ * <p>
+ * The methods {@link #add(Attribute)} and {@link #addAll(AttributeSet)} are
+ * respecified in this interface to indicate that only
+ * <code>DocAttribute</code> instances are allowed in this set.
+ * </p>
+ *
+ * @author Michael Koch (konqueror@gmx.de)
*/
public interface DocAttributeSet 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>DocAttribute</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>DocAttribute</code>.
+ * @throws UnmodifiableSetException if the set does not support modification.
+ *
+ * @see #add(Attribute)
*/
boolean addAll (AttributeSet attributes);
}
diff --git a/javax/print/attribute/PrintJobAttribute.java b/javax/print/attribute/PrintJobAttribute.java
index ba3a737b5..fd3663496 100644
--- a/javax/print/attribute/PrintJobAttribute.java
+++ b/javax/print/attribute/PrintJobAttribute.java
@@ -1,5 +1,5 @@
/* PrintJobAttribute.java --
- Copyright (C) 2003 Free Software Foundation, Inc.
+ Copyright (C) 2003, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -38,8 +38,23 @@ exception statement from your version. */
package javax.print.attribute;
/**
- * @author Michael Koch
+ * Marker interface for all attribute classes describing attributes or the
+ * status of a ({@link javax.print.DocPrintJob} object.
+ * <p>
+ * Instances of implementing attribute classes may be collected in a
+ * {@link javax.print.attribute.PrintJobAttributeSet}.
+ * </p><p>
+ * A print service uses attributes of this type to inform about the status
+ * of a print job.
+ * For example {@link javax.print.attribute.standard.DateTimeAtProcessing}
+ * is used to report at which date and time a job has started processing.
+ * </p>
+ *
+ * @see javax.print.attribute.PrintJobAttributeSet
+ *
+ * @author Michael Koch (konqueror@gmx.de)
*/
public interface PrintJobAttribute extends Attribute
{
+ // Marker interface
}
diff --git a/javax/print/attribute/PrintJobAttributeSet.java b/javax/print/attribute/PrintJobAttributeSet.java
index 905d53c2d..6283ae142 100644
--- a/javax/print/attribute/PrintJobAttributeSet.java
+++ b/javax/print/attribute/PrintJobAttributeSet.java
@@ -1,5 +1,5 @@
/* PrintJobAttributeSet.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>PrintJobAttributeSet</code> specifies an attribute set which only
+ * allows printing attributes of type
+ * {@link javax.print.attribute.PrintJobAttribute}.
+ * <p>
+ * The methods {@link #add(Attribute)} and {@link #addAll(AttributeSet)} are
+ * respecified in this interface to indicate that only
+ * <code>PrintJobAttribute</code> instances are allowed in this set.
+ * </p>
+ *
+ * @author Michael Koch (konqueror@gmx.de)
*/
public interface PrintJobAttributeSet 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>PrintJobAttribute</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>PrintJobAttribute</code>.
+ * @throws UnmodifiableSetException if the set does not support modification.
+ *
+ * @see #add(Attribute)
*/
boolean addAll (AttributeSet attributes);
}
diff --git a/javax/print/attribute/PrintRequestAttribute.java b/javax/print/attribute/PrintRequestAttribute.java
index 756350020..8a05b75d3 100644
--- a/javax/print/attribute/PrintRequestAttribute.java
+++ b/javax/print/attribute/PrintRequestAttribute.java
@@ -1,5 +1,5 @@
/* PrintRequestAttribute.java --
- Copyright (C) 2003 Free Software Foundation, Inc.
+ Copyright (C) 2003, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -38,8 +38,18 @@ exception statement from your version. */
package javax.print.attribute;
/**
- * @author Michael Koch
+ * Marker interface for all attribute classes which specify a requested
+ * attribute of {@link javax.print.DocPrintJob} object.
+ * <p>
+ * Instances of implementing attribute classes may be collected in a
+ * {@link javax.print.attribute.PrintRequestAttributeSet}.
+ * </p>
+ *
+ * @see javax.print.attribute.PrintRequestAttributeSet
+ *
+ * @author Michael Koch (konqueror@gmx.de)
*/
public interface PrintRequestAttribute extends Attribute
{
+ // Marker interface
}
diff --git a/javax/print/attribute/PrintRequestAttributeSet.java b/javax/print/attribute/PrintRequestAttributeSet.java
index d72d2d71c..350d9a644 100644
--- a/javax/print/attribute/PrintRequestAttributeSet.java
+++ b/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);
}
diff --git a/javax/print/attribute/PrintServiceAttribute.java b/javax/print/attribute/PrintServiceAttribute.java
index 3cf8825f5..213f43796 100644
--- a/javax/print/attribute/PrintServiceAttribute.java
+++ b/javax/print/attribute/PrintServiceAttribute.java
@@ -1,5 +1,5 @@
/* PrintServiceAttribute.java --
- Copyright (C) 2003 Free Software Foundation, Inc.
+ Copyright (C) 2003, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -38,8 +38,23 @@ exception statement from your version. */
package javax.print.attribute;
/**
- * @author Michael Koch
+ * Marker interface for all attribute classes describing parameters
+ * or the status of a {@link javax.print.PrintService}.
+ * <p>
+ * Instances of implementing attribute classes may be collected in a
+ * {@link javax.print.attribute.PrintServiceAttributeSet}.
+ * </p><p>
+ * A print service uses attributes of this type to inform about the status
+ * or the specific capabilities of itself.
+ * For example {@link javax.print.attribute.standard.PagesPerMinute} is used
+ * to specify the average printable pages per minute of the print service.
+ * </p>
+ *
+ * @see javax.print.attribute.PrintServiceAttributeSet
+ *
+ * @author Michael Koch (konqueror@gmx.de)
*/
public interface PrintServiceAttribute extends Attribute
{
+ // Marker interface
}
diff --git a/javax/print/attribute/PrintServiceAttributeSet.java b/javax/print/attribute/PrintServiceAttributeSet.java
index d67c9af55..fa22ee0d9 100644
--- a/javax/print/attribute/PrintServiceAttributeSet.java
+++ b/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);
}
diff --git a/javax/print/attribute/SupportedValuesAttribute.java b/javax/print/attribute/SupportedValuesAttribute.java
index d0f4b65c6..a001e7e91 100644
--- a/javax/print/attribute/SupportedValuesAttribute.java
+++ b/javax/print/attribute/SupportedValuesAttribute.java
@@ -1,5 +1,5 @@
-/* Attribute.java --
- Copyright (C) 2003 Free Software Foundation, Inc.
+/* SupportedValuesAttribute.java --
+ Copyright (C) 2003, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -38,8 +38,22 @@ exception statement from your version. */
package javax.print.attribute;
/**
- * @author Michael Koch
+ * Marker interface for all attribute classes specifying the
+ * supported/allowed values for another printing attribute class.
+ * <p>
+ * A {@link javax.print.PrintService} instance for example provides
+ * printing attribute classes implementing this interface to indicate
+ * that a specific attribute type is supported and if the supported values.
+ * </p><p>
+ * E.g. a {@link javax.print.attribute.standard.JobPrioritySupported}
+ * instance indicates that the attribute class
+ * {@link javax.print.attribute.standard.JobPriority} is supported and
+ * provides the number of the possible priority levels.
+ * </p>
+ *
+ * @author Michael Koch (konqueror@gmx.de)
*/
public interface SupportedValuesAttribute extends Attribute
{
+ // Marker interface
}
diff --git a/javax/print/attribute/UnmodifiableSetException.java b/javax/print/attribute/UnmodifiableSetException.java
index 678531769..ed1687c4c 100644
--- a/javax/print/attribute/UnmodifiableSetException.java
+++ b/javax/print/attribute/UnmodifiableSetException.java
@@ -1,5 +1,5 @@
-/* Attribute.java --
- Copyright (C) 2003 Free Software Foundation, Inc.
+/* UnmodifiableSetException.java --
+ Copyright (C) 2003, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -35,10 +35,14 @@ this exception to your version of the library, but you are not
obligated to do so. If you do not wish to do so, delete this
exception statement from your version. */
+
package javax.print.attribute;
/**
- * @author Michael Koch
+ * Exception which is thrown if an operation on an unmodifiable set
+ * is invoked.
+ *
+ * @author Michael Koch (konqueror@gmx.de)
*
* @since 1.4
*/
@@ -56,7 +60,7 @@ public class UnmodifiableSetException extends RuntimeException
* Creates a <code>UnmodifiableSetException</code>
* with the given message.
*
- * @param message the message for the exception
+ * @param message the message of the exception
*/
public UnmodifiableSetException(String message)
{
diff --git a/javax/print/attribute/package.html b/javax/print/attribute/package.html
index ba67d1a79..37f24d56b 100644
--- a/javax/print/attribute/package.html
+++ b/javax/print/attribute/package.html
@@ -1,6 +1,6 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<!-- package.html - describes classes in javax.print.attribute package.
- Copyright (C) 2003 Free Software Foundation, Inc.
+ Copyright (C) 2003, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -40,7 +40,10 @@ exception statement from your version. -->
<head><title>GNU Classpath - javax.print.attribute</title></head>
<body>
-<p></p>
-
+<p>Provides classes and interfaces describing the roles and
+syntax of attribute objects in the Java Print Service API.</p>
+<p>
+<b>Since:</b> 1.4
+</p>
</body>
</html>