diff --git a/src/java/org/apache/commons/lang/CharRange.java b/src/java/org/apache/commons/lang/CharRange.java
index fcc5fe1dd..c05b8e674 100644
--- a/src/java/org/apache/commons/lang/CharRange.java
+++ b/src/java/org/apache/commons/lang/CharRange.java
@@ -62,7 +62,7 @@
* @author Henri Yandell
* @author Stephen Colebourne
* @since 1.0
- * @version $Id: CharRange.java,v 1.6 2003/07/14 22:25:02 bayard Exp $
+ * @version $Id: CharRange.java,v 1.7 2003/07/16 00:39:05 scolebourne Exp $
*/
class CharRange {
@@ -101,6 +101,7 @@ public CharRange(char start, char close) {
* @param start String start first character is in this range (inclusive).
* @param close String first character is close character in this
* range (inclusive).
+ * @throws NullPointerException if either String is null
*/
public CharRange(String start, String close) {
this.start = start.charAt(0);
diff --git a/src/java/org/apache/commons/lang/CharSetUtils.java b/src/java/org/apache/commons/lang/CharSetUtils.java
index fb8bdf044..2909bfd7b 100644
--- a/src/java/org/apache/commons/lang/CharSetUtils.java
+++ b/src/java/org/apache/commons/lang/CharSetUtils.java
@@ -59,7 +59,7 @@
* @author Henri Yandell
* @author Stephen Colebourne
* @since 1.0
- * @version $Id: CharSetUtils.java,v 1.12 2003/07/14 22:25:02 bayard Exp $
+ * @version $Id: CharSetUtils.java,v 1.13 2003/07/16 00:39:05 scolebourne Exp $
*/
public class CharSetUtils {
@@ -104,6 +104,8 @@ public static CharSet evaluateSet(String[] set) {
*
* @param str the string to work from
* @param set the character set to use for manipulation
+ * @throws NullPointerException if str
is null
+ * @throws NullPointerException if set
is null
*/
public static String squeeze(String str, String set) {
String[] strs = new String[1];
@@ -123,8 +125,9 @@ public static String squeeze(String str, String set) {
*
* @param str the string to work from
* @param set the character set to use for manipulation
- * @throws NullPointerException if str
is
- * null
+ * @throws NullPointerException if str
is null
+ * @throws NullPointerException if set
is null
+ * or any element is null
*/
public static String squeeze(String str, String[] set) {
CharSet chars = evaluateSet(set);
@@ -157,6 +160,8 @@ public static String squeeze(String str, String[] set) {
*
* @param str String target to count characters in
* @param set String set of characters to count
+ * @throws NullPointerException if str
is null
+ * @throws NullPointerException if set
is null
*/
public static int count(String str, String set) {
String[] strs = new String[1];
@@ -175,6 +180,9 @@ public static int count(String str, String set) {
*
* @param str String target to count characters in
* @param set String[] set of characters to count
+ * @throws NullPointerException if str
is null
+ * @throws NullPointerException if set
is null
+ * or any element is null
*/
public static int count(String str, String[] set) {
CharSet chars = evaluateSet(set);
@@ -200,6 +208,8 @@ public static int count(String str, String[] set) {
*
* @param str String target to keep characters from
* @param set String set of characters to keep
+ * @throws NullPointerException if str
is null
+ * @throws NullPointerException if set
is null
*/
public static String keep(String str, String set) {
String[] strs = new String[1];
@@ -219,8 +229,9 @@ public static String keep(String str, String set) {
*
* @param str String target to keep characters from
* @param set String[] set of characters to keep
- * @throws NullPointerException of str
is
- * null
+ * @throws NullPointerException if str
is null
+ * @throws NullPointerException if set
is null
+ * or any element is null
*/
public static String keep(String str, String[] set) {
return modify(str, set, true);
@@ -237,6 +248,8 @@ public static String keep(String str, String[] set) {
*
* @param str String target to delete characters from
* @param set String set of characters to delete
+ * @throws NullPointerException if str
is null
+ * @throws NullPointerException if set
is null
*/
public static String delete(String str, String set) {
String[] strs = new String[1];
@@ -256,8 +269,9 @@ public static String delete(String str, String set) {
*
* @param str String target to delete characters from
* @param set String[] set of characters to delete
- * @throws NullPointerException of str
is
- * null
+ * @throws NullPointerException if str
is null
+ * @throws NullPointerException if set
is null
+ * or any element is null
*/
public static String delete(String str, String[] set) {
return modify(str, set, false);
diff --git a/src/java/org/apache/commons/lang/ClassUtils.java b/src/java/org/apache/commons/lang/ClassUtils.java
index 2258b3e49..2b2641cfb 100644
--- a/src/java/org/apache/commons/lang/ClassUtils.java
+++ b/src/java/org/apache/commons/lang/ClassUtils.java
@@ -62,7 +62,7 @@
* @author Stephen Colebourne
* @author Gary Gregory
* @since 2.0
- * @version $Id: ClassUtils.java,v 1.13 2003/07/14 22:25:02 bayard Exp $
+ * @version $Id: ClassUtils.java,v 1.14 2003/07/16 00:39:05 scolebourne Exp $
*/
public class ClassUtils {
@@ -102,7 +102,7 @@ public ClassUtils() {
/**
*
Gets the class name minus the package name for an Object
.
Gets the package name of an Object
.
Returns a default value if the object passed is
* null
.
Object
to test
- * @param defaultValue the default value to return
+ * @param object the Object
to test, may be null
+ * @param defaultValue the default value to return, may be null
* @return object
if it is not null
, defaultValue otherwise
*/
public static Object defaultIfNull(Object object, Object defaultValue) {
@@ -113,8 +113,8 @@ public static Object defaultIfNull(Object object, Object defaultValue) {
* Compares two objects for equality, where either one or both
* objects may be null
.
null
+ * @param object2 the second object, may be null
* @return true
if the values of both objects are the same
*/
public static boolean equals(Object object1, Object object2) {
diff --git a/src/java/org/apache/commons/lang/RandomStringUtils.java b/src/java/org/apache/commons/lang/RandomStringUtils.java
index c543790ce..57a76d3e8 100644
--- a/src/java/org/apache/commons/lang/RandomStringUtils.java
+++ b/src/java/org/apache/commons/lang/RandomStringUtils.java
@@ -65,7 +65,7 @@
* @author Gary Gregory
* @author Phil Steitz
* @since 1.0
- * @version $Id: RandomStringUtils.java,v 1.15 2003/07/08 22:06:35 scolebourne Exp $
+ * @version $Id: RandomStringUtils.java,v 1.16 2003/07/16 00:39:05 scolebourne Exp $
*/
public class RandomStringUtils {
@@ -93,7 +93,7 @@ public RandomStringUtils() {
*
* Characters will be chosen from the set of all characters.
* - * @param count length of random string to create + * @param count the length of random string to create * @return the random string */ public static String random(int count) { @@ -107,7 +107,7 @@ public static String random(int count) { *Characters will be chosen from the set of characters whose
* ASCII value is between 32
and 126
(inclusive).
Characters will be chosen from the set of alphabetic * characters.
* - * @param count length of random string to create + * @param count the length of random string to create * @return the random string */ public static String randomAlphabetic(int count) { @@ -135,7 +135,7 @@ public static String randomAlphabetic(int count) { *Characters will be chosen from the set of alpha-numeric * characters.
* - * @param count length of random string to create + * @param count the length of random string to create * @return the random string */ public static String randomAlphanumeric(int count) { @@ -149,7 +149,7 @@ public static String randomAlphanumeric(int count) { *Characters will be chosen from the set of numeric * characters.
* - * @param count length of random string to create + * @param count the length of random string to create * @return the random string */ public static String randomNumeric(int count) { @@ -163,10 +163,10 @@ public static String randomNumeric(int count) { *Characters will be chosen from the set of alpha-numeric * characters as indicated by the arguments.
* - * @param count length of random string to create - * @param letters iftrue
, generated string will include
+ * @param count the length of random string to create
+ * @param letters if true
, generated string will include
* alphabetic characters
- * @param numbers if true
, generatd string will include
+ * @param numbers if true
, generatd string will include
* numeric characters
* @return the random string
*/
@@ -181,12 +181,12 @@ public static String random(int count, boolean letters, boolean numbers) {
* Characters will be chosen from the set of alpha-numeric * characters as indicated by the arguments.
* - * @param count length of random string to create - * @param start position in set of chars to start at - * @param end position in set of chars to end before - * @param letters iftrue
, generated string will include
+ * @param count the length of random string to create
+ * @param start the position in set of chars to start at
+ * @param end the position in set of chars to end before
+ * @param letters if true
, generated string will include
* alphabetic characters
- * @param numbers if true
, generated string will include
+ * @param numbers if true
, generated string will include
* numeric characters
* @return the random string
*/
@@ -203,13 +203,13 @@ public static String random(int count, int start, int end, boolean letters, bool
* instead of using an externally supplied source of randomness, it uses
* the internal static {@link Random} instance ({@link #RANDOM}).
*
- * @param count length of random string to create
- * @param start position in set of chars to start at
- * @param end position in set of chars to end before
- * @param letters only allow letters?
- * @param numbers only allow numbers?
- * @param set set of chars to choose randoms from. If null
,
- * then it will use the set of all chars.
+ * @param count the length of random string to create
+ * @param start the position in set of chars to start at
+ * @param end the position in set of chars to end before
+ * @param letters only allow letters?
+ * @param numbers only allow numbers?
+ * @param set the 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.
@@ -236,14 +236,14 @@ public static String random(int count, int start, int end, boolean letters, bool
* usage of RandomStringUtils
in situations that need
* repetitive behaviour.
*
- * @param count length of random string to create
- * @param start position in set of chars to start at
- * @param end position in set of chars to end before
- * @param letters only allow letters?
- * @param numbers only allow numbers?
- * @param set set of chars to choose randoms from. If null
,
- * then it will use the set of all chars.
- * @param random source of randomness.
+ * @param count the length of random string to create
+ * @param start the position in set of chars to start at
+ * @param end the position in set of chars to end before
+ * @param letters only allow letters?
+ * @param numbers only allow numbers?
+ * @param set the set of chars to choose randoms from.
+ * If null
, then it will use the set of all chars.
+ * @param random a source of randomness.
* @return the random string
* @throws ArrayIndexOutOfBoundsException if there are not
* (end - start) + 1
characters in the set array.
@@ -295,9 +295,11 @@ public static String random(int count, int start, int end, boolean letters, bool
* Characters will be chosen from the set of characters * specified.
* - * @param count length of random string to create - * @param set String containing the set of characters to use + * @param count the length of random string to create + * @param set the String containing the set of characters to use, + * must not benull
* @return the random string
+ * @throws NullPointerException if the set is null
*/
public static String random(int count, String set) {
return random(count, set.toCharArray());
@@ -309,9 +311,11 @@ public static String random(int count, String set) {
*
* Characters will be chosen from the set of characters specified.
* - * @param count length of random string to create - * @param set character array containing the set of characters to use + * @param count the length of random string to create + * @param set the character array containing the set of characters to use + * must not benull
* @return the random string
+ * @throws NullPointerException if the set is null
*/
public static String random(int count, char[] set) {
return random(count, 0, set.length, false, false, set);