A few @throws and @params, and cut out a TODO type item in the javadoc
comment.



Index: CharSetUtils.java
===================================================================
RCS file: 
/home/cvspublic/jakarta-commons/lang/src/java/org/apache/commons/lang/CharSetUtils.java,v
retrieving revision 1.4
diff -u -w -r1.4 CharSetUtils.java
--- CharSetUtils.java   18 Sep 2002 19:55:32 -0000      1.4
+++ CharSetUtils.java   27 Sep 2002 21:35:52 -0000
@@ -84,6 +84,8 @@
      * "^e" implies not e. However it only negates, it's not 
      * a set in itself due to the size of that set in unicode.
      * "ej-m" implies e,j->m. e,j,k,l,m.
+     * @param set
+     * @return CharSet
      */
     public static CharSet evaluateSet(String[] set) {
         return new CharSet(set); 
@@ -112,6 +114,7 @@
      * 
      * @param str  the string to work from
      * @param set  the character set to use for manipulation
+     * @throws NullPointerException if str is null
      */
     public static String squeeze(String str, String[] set) {
         CharSet chars = evaluateSet(set);
@@ -189,6 +192,7 @@
      *
      * @param str  String target to delete characters from
      * @param set  String[] set of characters to delete
+     * @throws NullPointerException of str is null
      */
     public static String delete(String str, String[] set) {
         CharSet chars = evaluateSet(set);
@@ -204,7 +208,6 @@
     }
 
     /**
-     * NEEDS TO TAKE A CHAR-SET.
      * Translate characters in a String.
      * An example is:  translate("hello", "ho", "jy") => jelly
      * If the length of characters to search for is greater than the 
@@ -214,6 +217,7 @@
      * @param target String to replace characters  in
      * @param repl String to find that will be replaced
      * @param with String to put into the target String
+     * @throws NullPointerException if target, with or repl is null
      */
     public static String translate(String target, String repl, String with) {
         StringBuffer buffer = new StringBuffer(target.length());

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to