Javadoc fixes and enhancements from Steve Downey


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@137070 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/src/java/org/apache/commons/lang/CharSet.java b/src/java/org/apache/commons/lang/CharSet.java
index d0edfa1..c42a6db 100644
--- a/src/java/org/apache/commons/lang/CharSet.java
+++ b/src/java/org/apache/commons/lang/CharSet.java
@@ -63,14 +63,16 @@
  *
  * @author <a href="bayard@generationjava.com">Henri Yandell</a>
  * @author <a href="mailto:scolebourne@joda.org">Stephen Colebourne</a>
- * @version $Id: CharSet.java,v 1.1 2002/07/19 03:35:54 bayard Exp $
+ * @version $Id: CharSet.java,v 1.2 2002/09/28 10:34:54 scolebourne Exp $
  */
 public class CharSet {
 
     private LinkedList set = new LinkedList();
 
     /**
-     * Restricted consructor. Use the factory method evaluateSet().
+     * Restricted constructor. Use the factory method evaluateSet().
+     *
+     * @throws NullPointerException if any of set[i] is null or if set is null
      */
     protected CharSet(String[] set) {
         int sz = set.length;
@@ -107,6 +109,7 @@
      * Add a set definition string to the set
      * 
      * @param str  set definition string
+     * @throws NullPointerException if str is null
      */
     protected void add(String str) {
         int sz = str.length();
diff --git a/src/java/org/apache/commons/lang/CharSetUtils.java b/src/java/org/apache/commons/lang/CharSetUtils.java
index 648b7d7..1b0b7f4 100644
--- a/src/java/org/apache/commons/lang/CharSetUtils.java
+++ b/src/java/org/apache/commons/lang/CharSetUtils.java
@@ -63,7 +63,7 @@
  *
  * @author <a href="bayard@generationjava.com">Henri Yandell</a>
  * @author <a href="mailto:scolebourne@joda.org">Stephen Colebourne</a>
- * @version $Id: CharSetUtils.java,v 1.4 2002/09/18 19:55:32 scolebourne Exp $
+ * @version $Id: CharSetUtils.java,v 1.5 2002/09/28 10:34:54 scolebourne Exp $
  */
 public class CharSetUtils {
 
@@ -84,6 +84,11 @@
      * "^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
+     * @throws NullPointerException if any of set[i] is null or if set is null
+     * @param set
+     * @return CharSet
      */
     public static CharSet evaluateSet(String[] set) {
         return new CharSet(set); 
@@ -112,6 +117,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 +195,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 +211,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 +220,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());
diff --git a/src/java/org/apache/commons/lang/NumberUtils.java b/src/java/org/apache/commons/lang/NumberUtils.java
index 4bb7a6e..0935526 100644
--- a/src/java/org/apache/commons/lang/NumberUtils.java
+++ b/src/java/org/apache/commons/lang/NumberUtils.java
@@ -63,7 +63,7 @@
  * @author <a href="mailto:rand_mcneely@yahoo.com">Rand McNeely</a>
  * @author <a href="mailto:scolebourne@joda.org">Stephen Colebourne</a>
  * @author <a href="mailto:steve.downey@netfolio.com">Steve Downey</a>
- * @version $Id: NumberUtils.java,v 1.2 2002/09/15 10:26:42 scolebourne Exp $
+ * @version $Id: NumberUtils.java,v 1.3 2002/09/28 10:34:54 scolebourne Exp $
  */
 public final class NumberUtils {
 
@@ -491,8 +491,8 @@
      * <li>Normal positve numbers
      * <li>+0.0
      * <li>-0.0
-     * <li>Minimum double (-Double.MAX_VALUE)
      * <li>Normal negative numbers
+     * <li>Minimum double (-Double.MAX_VALUE)
      * <li>Negative infinity
      * </ul>
      * Comparing NaN with NaN will return 0.
diff --git a/src/java/org/apache/commons/lang/RandomStringUtils.java b/src/java/org/apache/commons/lang/RandomStringUtils.java
index 5e59c97..c3e2dfa 100644
--- a/src/java/org/apache/commons/lang/RandomStringUtils.java
+++ b/src/java/org/apache/commons/lang/RandomStringUtils.java
@@ -63,7 +63,7 @@
  * @author <a href="mailto:bayard@generationjava.com">Henri Yandell</a>
  * @author <a href="mailto:steven@caswell.name">Steven Caswell</a>
  * @author <a href="mailto:scolebourne@joda.org">Stephen Colebourne</a>
- * @version $Id: RandomStringUtils.java,v 1.4 2002/09/18 19:53:52 bayard Exp $
+ * @version $Id: RandomStringUtils.java,v 1.5 2002/09/28 10:34:54 scolebourne Exp $
  */
 public class RandomStringUtils {
 
@@ -178,6 +178,12 @@
     
     /**
      * Creates a random string based on a variety of options.
+	 * If start and end are both 0, start and end are set to ' ' and 'z', the ASCII
+	 * printable characters, will be used, unless letters and numbers are both 
+	 * false, in which case, start and end are set to 0 and Integer.MAX_VALUE.
+	 * <p>
+	 * If set is not null, characters between start and end are chosen.
+	 * <p>
      *
      * @param count int length of random string to create
      * @param start int position in set of chars to start at
@@ -187,6 +193,8 @@
      * @param set char[] set of chars to choose randoms from.
      *        If null, then it will use the set of all chars.
      * @return the random string
+     * @throws ArrayIndexOutOfBoundsException if there are not (end - start) + 1 
+     * characters in the set array.
      */
     public static String random(int count, int start, int end, boolean letters, boolean numbers, char[] set) {
         if( (start == 0) && (end == 0) ) {
diff --git a/src/java/org/apache/commons/lang/StringUtils.java b/src/java/org/apache/commons/lang/StringUtils.java
index fdb9eed..805ed72 100644
--- a/src/java/org/apache/commons/lang/StringUtils.java
+++ b/src/java/org/apache/commons/lang/StringUtils.java
@@ -73,16 +73,11 @@
  * @author <a href="mailto:rand_mcneely@yahoo.com>Rand McNeely</a>
  * @author <a href="mailto:scolebourne@joda.org>Stephen Colebourne</a>
  * @author <a href="mailto:fredrik@westermarck.com>Fredrik Westermarck</a>
- * @version $Id: StringUtils.java,v 1.15 2002/09/27 06:08:16 bayard Exp $
+ * @version $Id: StringUtils.java,v 1.16 2002/09/28 10:34:54 scolebourne Exp $
  */
 public class StringUtils {
 
     /**
-     * The size of the buffer to use when working with I/O (4 kB).
-     */
-    public static final int CHAR_BUFFER_SIZE = 4 * 1024;
-    
-    /**
      * StringUtils instances should NOT be constructed in standard programming.
      * Instead, the class should be used as <code>StringUtils.trim(" foo ");</code>.
      * This constructor is public to permit tools that require a JavaBean instance