summaryrefslogtreecommitdiff
path: root/java/awt/RenderingHints.java
diff options
context:
space:
mode:
authorDavid Gilbert <david.gilbert@object-refinery.com>2005-07-01 20:44:54 +0000
committerDavid Gilbert <david.gilbert@object-refinery.com>2005-07-01 20:44:54 +0000
commit6f8ffc3c1a3fa76d86e3836008530a920a541188 (patch)
treec175bda8653b5a51d6865312a089b1f109668662 /java/awt/RenderingHints.java
parent3764f982056281320f48dfa458cf486f2751fc86 (diff)
downloadclasspath-6f8ffc3c1a3fa76d86e3836008530a920a541188.tar.gz
2005-07-01 David Gilbert <david.gilbert@object-refinery.com>
* java/awt/RenderingHints.java: API doc updates.
Diffstat (limited to 'java/awt/RenderingHints.java')
-rw-r--r--java/awt/RenderingHints.java20
1 files changed, 15 insertions, 5 deletions
diff --git a/java/awt/RenderingHints.java b/java/awt/RenderingHints.java
index 86e0eb6f0..69d4fd1a4 100644
--- a/java/awt/RenderingHints.java
+++ b/java/awt/RenderingHints.java
@@ -1,5 +1,5 @@
/* RenderingHints.java --
- Copyright (C) 2000, 2001, 2002, 2004 Free Software Foundation
+ Copyright (C) 2000, 2001, 2002, 2004, 2005 Free Software Foundation
This file is part of GNU Classpath.
@@ -592,14 +592,18 @@ public class RenderingHints implements Map, Cloneable
* Returns <code>true</code> if the collection of hints contains the
* specified key, and <code>false</code> otherwise.
*
- * @param key the key.
+ * @param key the key (<code>null</code> not permitted).
*
* @return A boolean.
+ *
+ * @throws NullPointerException if <code>key</code> is <code>null</code>.
+ * @throws ClassCastException if <code>key</code> is not a {@link Key}.
*/
public boolean containsKey(Object key)
{
if (key == null)
throw new NullPointerException();
+ // don't remove the cast, it is necessary to throw the required exception
return hintMap.containsKey((Key) key);
}
@@ -617,14 +621,20 @@ public class RenderingHints implements Map, Cloneable
}
/**
- * Returns the value associated with the specified key.
+ * Returns the value associated with the specified key, or <code>null</code>
+ * if there is no value defined for the key.
*
- * @param key the key.
+ * @param key the key (<code>null</code> permitted).
+ *
+ * @return The value (possibly <code>null</code>).
+ *
+ * @throws ClassCastException if <code>key</code> is not a {@link Key}.
*
- * @return The value.
+ * @see #containsKey(Object)
*/
public Object get(Object key)
{
+ // don't remove the cast, it is necessary to throw the required exception
return hintMap.get((Key) key);
}