summaryrefslogtreecommitdiff
path: root/libjava/classpath/javax/print/attribute/standard/JobMediaSheetsSupported.java
diff options
context:
space:
mode:
Diffstat (limited to 'libjava/classpath/javax/print/attribute/standard/JobMediaSheetsSupported.java')
-rw-r--r--libjava/classpath/javax/print/attribute/standard/JobMediaSheetsSupported.java42
1 files changed, 38 insertions, 4 deletions
diff --git a/libjava/classpath/javax/print/attribute/standard/JobMediaSheetsSupported.java b/libjava/classpath/javax/print/attribute/standard/JobMediaSheetsSupported.java
index 392fe7ed708..cb06af6fabe 100644
--- a/libjava/classpath/javax/print/attribute/standard/JobMediaSheetsSupported.java
+++ b/libjava/classpath/javax/print/attribute/standard/JobMediaSheetsSupported.java
@@ -1,5 +1,5 @@
/* JobMediaSheetsSupported.java --
- Copyright (C) 2004 Free Software Foundation, Inc.
+ Copyright (C) 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -42,7 +42,15 @@ import javax.print.attribute.SupportedValuesAttribute;
/**
+ * The <code>JobMediaSheetsSupported</code> printing attribute specifies the
+ * supported range of values for the
+ * {@link javax.print.attribute.standard.JobMediaSheets} attribute.
+ * <p>
+ * <b>IPP Compatibility:</b> JobMediaSheetsSupported is an IPP 1.1 attribute.
+ * </p>
+ *
* @author Michael Koch (konqueror@gmx.de)
+ * @author Wolfgang Baer (WBaer@gmx.de)
*/
public final class JobMediaSheetsSupported extends SetOfIntegerSyntax
implements SupportedValuesAttribute
@@ -50,17 +58,43 @@ public final class JobMediaSheetsSupported extends SetOfIntegerSyntax
private static final long serialVersionUID = 2953685470388672940L;
/**
- * Constructs a <code>JobMediaSheetsSupported</code> object.
+ * Constructs a <code>JobMediaSheetsSupported</code> object with the
+ * given range of supported job media sheets values.
+ *
+ * @param lowerBound the lower bound value
+ * @param upperBound the upper bound value
+ *
+ * @exception IllegalArgumentException if lowerBound &lt;= upperbound
+ * and lowerBound &lt; 1
*/
public JobMediaSheetsSupported(int lowerBound, int upperBound)
{
super(lowerBound, upperBound);
+
+ if (lowerBound < 1)
+ throw new IllegalArgumentException("lowerBound may not be less than 1");
+ }
+
+ /**
+ * Tests if the given object is equal to this object.
+ *
+ * @param obj the object to test
+ *
+ * @return <code>true</code> if both objects are equal,
+ * <code>false</code> otherwise.
+ */
+ public boolean equals(Object obj)
+ {
+ if (! (obj instanceof JobMediaSheetsSupported))
+ return false;
+
+ return super.equals(obj);
}
/**
* Returns category of this class.
*
- * @return the class <code>JobMediaSheetsSupported</code> itself
+ * @return The class <code>JobMediaSheetsSupported</code> itself.
*/
public Class getCategory()
{
@@ -70,7 +104,7 @@ public final class JobMediaSheetsSupported extends SetOfIntegerSyntax
/**
* Returns the name of this attribute.
*
- * @return the name
+ * @return The name "job-media-sheets-supported".
*/
public String getName()
{