classpath-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[cp-patches] FYI: RenderingHints API doc updates


From: David Gilbert
Subject: [cp-patches] FYI: RenderingHints API doc updates
Date: Fri, 01 Jul 2005 21:48:26 +0000
User-agent: Mozilla Thunderbird 1.0.2 (X11/20050426)

I committed this patch to update some API docs:

2005-07-01  David Gilbert  <address@hidden>

        * java/awt/RenderingHints.java: API doc updates.

Regards,

Dave Gilbert
Index: java/awt/RenderingHints.java
===================================================================
RCS file: /cvsroot/classpath/classpath/java/awt/RenderingHints.java,v
retrieving revision 1.5
diff -u -r1.5 RenderingHints.java
--- java/awt/RenderingHints.java        16 Feb 2005 10:39:26 -0000      1.5
+++ java/awt/RenderingHints.java        1 Jul 2005 20:42:28 -0000
@@ -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 @@
    * 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 address@hidden 
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 @@
   }
 
   /**
-   * 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 address@hidden 
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);
   }
 

reply via email to

[Prev in Thread] Current Thread [Next in Thread]