diff --git a/src/java/org/apache/commons/lang/ArrayUtils.java b/src/java/org/apache/commons/lang/ArrayUtils.java index 724c6c627..214d4b290 100644 --- a/src/java/org/apache/commons/lang/ArrayUtils.java +++ b/src/java/org/apache/commons/lang/ArrayUtils.java @@ -60,6 +60,7 @@ import org.apache.commons.lang.builder.EqualsBuilder; import org.apache.commons.lang.builder.HashCodeBuilder; import org.apache.commons.lang.builder.ToStringBuilder; import org.apache.commons.lang.builder.ToStringStyle; + /** *

ArrayUtils contains utility methods for working with * arrays.

@@ -75,7 +76,7 @@ import org.apache.commons.lang.builder.ToStringStyle; * @author Nikolay Metchev * @author Matthew Hawthorne * @since 2.0 - * @version $Id: ArrayUtils.java,v 1.20 2003/07/31 23:45:28 scolebourne Exp $ + * @version $Id: ArrayUtils.java,v 1.21 2003/08/01 20:45:17 scolebourne Exp $ */ public class ArrayUtils { @@ -228,6 +229,7 @@ public class ArrayUtils { return new EqualsBuilder().append(array1, array2).isEquals(); } + // To map //----------------------------------------------------------------------- /** *

Converts the given array into a {@link java.util.Map}. Each element of the array diff --git a/src/java/org/apache/commons/lang/BooleanUtils.java b/src/java/org/apache/commons/lang/BooleanUtils.java index 06b99cd16..8e9c192dd 100644 --- a/src/java/org/apache/commons/lang/BooleanUtils.java +++ b/src/java/org/apache/commons/lang/BooleanUtils.java @@ -66,7 +66,7 @@ import org.apache.commons.lang.math.NumberUtils; * @author Stephen Colebourne * @author Matthew Hawthorne * @since 2.0 - * @version $Id: BooleanUtils.java,v 1.11 2003/07/31 23:55:57 scolebourne Exp $ + * @version $Id: BooleanUtils.java,v 1.12 2003/08/01 20:45:17 scolebourne Exp $ */ public class BooleanUtils { @@ -98,7 +98,7 @@ public class BooleanUtils { } // boolean Boolean methods - //-------------------------------------------------------------------------- + //----------------------------------------------------------------------- /** *

Boolean factory that avoids creating new Boolean objecs all the time.

* @@ -141,7 +141,7 @@ public class BooleanUtils { } // Integer to Boolean methods - //-------------------------------------------------------------------------- + //----------------------------------------------------------------------- /** *

Convert an int to a boolean using the convention that zero * is false.

@@ -285,7 +285,7 @@ public class BooleanUtils { } // Boolean to Integer methods - //-------------------------------------------------------------------------- + //----------------------------------------------------------------------- /** *

Convert a boolean to an int using the convention that * zero is false.

@@ -386,7 +386,7 @@ public class BooleanUtils { } // String to Boolean methods - //-------------------------------------------------------------------------- + //----------------------------------------------------------------------- /** *

Converts a String to a Boolean.

* @@ -452,7 +452,7 @@ public class BooleanUtils { } // String to boolean methods - //-------------------------------------------------------------------------- + //----------------------------------------------------------------------- /** *

Converts a String to a boolean.

* @@ -505,7 +505,7 @@ public class BooleanUtils { } // Boolean to String methods - //-------------------------------------------------------------------------- + //----------------------------------------------------------------------- /** *

Converts a Boolean to a String returning 'true', * 'false', or null.

@@ -562,7 +562,7 @@ public class BooleanUtils { } // boolean to String methods - //-------------------------------------------------------------------------- + //----------------------------------------------------------------------- /** *

Converts a boolean to a String returning 'true' * or 'false'.

@@ -614,7 +614,7 @@ public class BooleanUtils { } // xor methods - // -------------------------------------------------------------------------- + // ---------------------------------------------------------------------- /** *

Performs an xor on a set of booleans.

* diff --git a/src/java/org/apache/commons/lang/CharSetUtils.java b/src/java/org/apache/commons/lang/CharSetUtils.java index a6d6b001f..4a7edaf22 100644 --- a/src/java/org/apache/commons/lang/CharSetUtils.java +++ b/src/java/org/apache/commons/lang/CharSetUtils.java @@ -63,7 +63,7 @@ package org.apache.commons.lang; * @author Henri Yandell * @author Stephen Colebourne * @since 1.0 - * @version $Id: CharSetUtils.java,v 1.18 2003/07/31 21:32:47 scolebourne Exp $ + * @version $Id: CharSetUtils.java,v 1.19 2003/08/01 20:45:17 scolebourne Exp $ */ public class CharSetUtils { @@ -77,6 +77,7 @@ public class CharSetUtils { public CharSetUtils() { } + // Factory //----------------------------------------------------------------------- /** *

Creates a CharSetUtils object which allows a certain amount of @@ -132,6 +133,7 @@ public class CharSetUtils { return new CharSet(set); } + // Squeeze //----------------------------------------------------------------------- /** *

Squeezes any repititions of a character that is mentioned in the @@ -197,6 +199,7 @@ public class CharSetUtils { return buffer.toString(); } + // Count //----------------------------------------------------------------------- /** *

Takes an argument in set-syntax, see evaluateSet, @@ -255,6 +258,7 @@ public class CharSetUtils { return count; } + // Keep //----------------------------------------------------------------------- /** *

Takes an argument in set-syntax, see evaluateSet, @@ -311,6 +315,7 @@ public class CharSetUtils { return modify(str, set, true); } + // Delete //----------------------------------------------------------------------- /** *

Takes an argument in set-syntax, see evaluateSet, @@ -376,6 +381,7 @@ public class CharSetUtils { return buffer.toString(); } + // Translate //----------------------------------------------------------------------- /** *

Translate characters in a String. diff --git a/src/java/org/apache/commons/lang/ClassUtils.java b/src/java/org/apache/commons/lang/ClassUtils.java index 34962a9ee..9e60a680f 100644 --- a/src/java/org/apache/commons/lang/ClassUtils.java +++ b/src/java/org/apache/commons/lang/ClassUtils.java @@ -65,7 +65,7 @@ import java.util.List; * @author Stephen Colebourne * @author Gary Gregory * @since 2.0 - * @version $Id: ClassUtils.java,v 1.18 2003/07/31 23:47:20 scolebourne Exp $ + * @version $Id: ClassUtils.java,v 1.19 2003/08/01 20:45:17 scolebourne Exp $ */ public class ClassUtils { @@ -100,8 +100,8 @@ public class ClassUtils { public ClassUtils() { } - // ------------------------------------------------------------------------- - + // Short class name + // ---------------------------------------------------------------------- /** *

Gets the class name minus the package name for an Object.

* @@ -157,8 +157,8 @@ public class ClassUtils { return new String(chars, lastDot, chars.length - lastDot); } - // ------------------------------------------------------------------------- - + // Package name + // ---------------------------------------------------------------------- /** *

Gets the package name of an Object.

* @@ -209,8 +209,8 @@ public class ClassUtils { return className.substring(0, i); } - // ------------------------------------------------------------------------- - + // Superclasses/Superinterfaces + // ---------------------------------------------------------------------- /** *

Gets a List of superclasses for the given class.

* @@ -321,8 +321,8 @@ public class ClassUtils { // return null; // } - // ------------------------------------------------------------------------- - + // Convert list + // ---------------------------------------------------------------------- /** *

Given a List of class names, this method converts them into classes.

* @@ -379,8 +379,8 @@ public class ClassUtils { return classNames; } - // ------------------------------------------------------------------------- - + // Is assignable + // ---------------------------------------------------------------------- /** *

Checks if an array of Classes can be assigned to another array of Classes.

* @@ -514,6 +514,8 @@ public class ClassUtils { return toClass.isAssignableFrom(cls); } + // Inner class + // ---------------------------------------------------------------------- /** *

Is the specified class an inner class or static nested class.

* diff --git a/src/java/org/apache/commons/lang/ObjectUtils.java b/src/java/org/apache/commons/lang/ObjectUtils.java index 7c6a37923..8908d717e 100644 --- a/src/java/org/apache/commons/lang/ObjectUtils.java +++ b/src/java/org/apache/commons/lang/ObjectUtils.java @@ -68,7 +68,7 @@ import java.io.Serializable; * @author Stephen Colebourne * @author Gary Gregory * @since 1.0 - * @version $Id: ObjectUtils.java,v 1.15 2003/07/26 00:45:27 ggregory Exp $ + * @version $Id: ObjectUtils.java,v 1.16 2003/08/01 20:45:17 scolebourne Exp $ */ public class ObjectUtils { @@ -101,6 +101,7 @@ public class ObjectUtils { public ObjectUtils() { } + // Defaulting //----------------------------------------------------------------------- /** *

Returns a default value if the object passed is @@ -151,6 +152,7 @@ public class ObjectUtils { return object1.equals(object2); } + // Identity ToString //----------------------------------------------------------------------- /** *

Gets the toString that would be produced by Object @@ -205,6 +207,7 @@ public class ObjectUtils { .append(Integer.toHexString(System.identityHashCode(object))); } + // ToString //----------------------------------------------------------------------- /** *

Gets the toString of an Object returning @@ -244,6 +247,7 @@ public class ObjectUtils { return (obj == null ? nullStr : obj.toString()); } + // Null //----------------------------------------------------------------------- /** *

Class used as a null placeholder where null diff --git a/src/java/org/apache/commons/lang/RandomStringUtils.java b/src/java/org/apache/commons/lang/RandomStringUtils.java index c4e0d704e..400df88e8 100644 --- a/src/java/org/apache/commons/lang/RandomStringUtils.java +++ b/src/java/org/apache/commons/lang/RandomStringUtils.java @@ -64,7 +64,7 @@ import java.util.Random; * @author Gary Gregory * @author Phil Steitz * @since 1.0 - * @version $Id: RandomStringUtils.java,v 1.20 2003/07/31 23:24:35 scolebourne Exp $ + * @version $Id: RandomStringUtils.java,v 1.21 2003/08/01 20:45:17 scolebourne Exp $ */ public class RandomStringUtils { @@ -86,6 +86,8 @@ public class RandomStringUtils { public RandomStringUtils() { } + // Random + //----------------------------------------------------------------------- /** *

Creates a random string whose length is the number of characters * specified.

diff --git a/src/java/org/apache/commons/lang/SerializationUtils.java b/src/java/org/apache/commons/lang/SerializationUtils.java index 925bd68fb..4c59f4e82 100644 --- a/src/java/org/apache/commons/lang/SerializationUtils.java +++ b/src/java/org/apache/commons/lang/SerializationUtils.java @@ -81,7 +81,7 @@ import java.io.Serializable; * @author Stephen Colebourne * @author Jeff Varszegi * @since 1.0 - * @version $Id: SerializationUtils.java,v 1.8 2003/07/31 23:45:28 scolebourne Exp $ + * @version $Id: SerializationUtils.java,v 1.9 2003/08/01 20:45:17 scolebourne Exp $ */ public class SerializationUtils { @@ -96,6 +96,8 @@ public class SerializationUtils { super(); } + // Clone + //----------------------------------------------------------------------- /** *

Deep clone an Object using serialization.

* @@ -113,6 +115,8 @@ public class SerializationUtils { return deserialize(serialize(object)); } + // Serialize + //----------------------------------------------------------------------- /** *

Serializes an Object to the specified stream.

* @@ -165,6 +169,8 @@ public class SerializationUtils { return baos.toByteArray(); } + // Deserialize + //----------------------------------------------------------------------- /** *

Deserializes an Object from the specified stream.

* diff --git a/src/java/org/apache/commons/lang/StringEscapeUtils.java b/src/java/org/apache/commons/lang/StringEscapeUtils.java index 88e78cc5c..f345abc9d 100644 --- a/src/java/org/apache/commons/lang/StringEscapeUtils.java +++ b/src/java/org/apache/commons/lang/StringEscapeUtils.java @@ -73,7 +73,7 @@ import org.apache.commons.lang.exception.NestableRuntimeException; * @author Gary Gregory * @author Phil Steitz * @since 2.0 - * @version $Id: StringEscapeUtils.java,v 1.22 2003/07/31 23:45:28 scolebourne Exp $ + * @version $Id: StringEscapeUtils.java,v 1.23 2003/08/01 20:45:17 scolebourne Exp $ */ public class StringEscapeUtils { @@ -429,7 +429,6 @@ public class StringEscapeUtils { // HTML and XML //-------------------------------------------------------------------------- - /** *

Escapes the characters in a String using HTML entities.

* diff --git a/src/java/org/apache/commons/lang/StringUtils.java b/src/java/org/apache/commons/lang/StringUtils.java index cf5c5e162..08840bce9 100644 --- a/src/java/org/apache/commons/lang/StringUtils.java +++ b/src/java/org/apache/commons/lang/StringUtils.java @@ -76,10 +76,8 @@ import java.util.List; * - does String contain only/none of these characters *
  • SubString/Left/Right/Mid/SubStringBefore/SubStringAfter * - null-safe substring extraction - *
  • Split - * - splits a String into an array of subtrings based on a separator - *
  • Join/Concatenate - * - joins an array of Strings into one with optional separator + *
  • Split/Join + * - splits a String into an array of substrings and vice versa *
  • Replace/Delete/Overlay * - Searches a String and replaces one String with another *
  • Chomp/Chop @@ -146,7 +144,7 @@ import java.util.List; * @author Gary Gregory * @author Phil Steitz * @since 1.0 - * @version $Id: StringUtils.java,v 1.83 2003/07/31 20:38:26 scolebourne Exp $ + * @version $Id: StringUtils.java,v 1.84 2003/08/01 20:45:17 scolebourne Exp $ */ public class StringUtils { // Performance testing notes (JDK 1.4, Jul03, scolebourne) @@ -195,7 +193,6 @@ public class StringUtils { // Empty checks //----------------------------------------------------------------------- - /** *

    Checks if a String is empty ("") or null.

    * @@ -293,7 +290,6 @@ public class StringUtils { // Trim //----------------------------------------------------------------------- - /** *

    Removes control characters (char <= 32) from both * ends of this String, handling null by returning @@ -396,7 +392,6 @@ public class StringUtils { // Stripping //----------------------------------------------------------------------- - /** *

    Strips whitespace from the start and end of a String.

    * @@ -602,7 +597,6 @@ public class StringUtils { // StripAll //----------------------------------------------------------------------- - /** *

    Strips whitespace from the start and end of every String in an array. * Whitespace is defined by {@link Character#isWhitespace(char)}.

    @@ -665,7 +659,6 @@ public class StringUtils { // Equals //----------------------------------------------------------------------- - /** *

    Compares two Strings, returning true if they are equal.

    * @@ -717,7 +710,6 @@ public class StringUtils { // IndexOf //----------------------------------------------------------------------- - /** *

    Finds the first index within a String, handling null. * This method uses {@link String#indexOf(int)}.

    @@ -845,7 +837,6 @@ public class StringUtils { // LastIndexOf //----------------------------------------------------------------------- - /** *

    Finds the last index within a String, handling null. * This method uses {@link String#lastIndexOf(int)}.

    @@ -968,7 +959,6 @@ public class StringUtils { // Contains //----------------------------------------------------------------------- - /** *

    Checks if String contains a search character, handling null. * This method uses {@link String#indexOf(int)}.

    @@ -1023,7 +1013,6 @@ public class StringUtils { // IndexOfAny //----------------------------------------------------------------------- - /** *

    Find the first index of any of a set of potential substrings.

    * @@ -1125,7 +1114,6 @@ public class StringUtils { // IndexOfAnyBut //----------------------------------------------------------------------- - /** *

    Search a String to find the first index of any * character not in the given set of characters.

    @@ -1187,7 +1175,6 @@ public class StringUtils { // ContainsOnly //----------------------------------------------------------------------- - /** *

    Checks if the String contains only certain characters.

    * @@ -1253,7 +1240,6 @@ public class StringUtils { // ContainsNone //----------------------------------------------------------------------- - /** *

    Checks that the String does not contain certain characters.

    * @@ -1322,7 +1308,6 @@ public class StringUtils { // Substring //----------------------------------------------------------------------- - /** *

    Gets a substring from the specified String avoiding exceptions.

    * @@ -1437,7 +1422,6 @@ public class StringUtils { // Left/Right/Mid //----------------------------------------------------------------------- - /** *

    Gets the leftmost len characters of a String.

    * @@ -1555,7 +1539,6 @@ public class StringUtils { // SubStringAfter/SubStringBefore //----------------------------------------------------------------------- - /** *

    Gets the substring before the first occurance of a separator. * The separator is not returned.

    @@ -1710,7 +1693,6 @@ public class StringUtils { // Splitting //----------------------------------------------------------------------- - /** *

    Splits the provided text into an array, using whitespace as the * separator. @@ -2100,7 +2082,6 @@ public class StringUtils { // Delete //----------------------------------------------------------------------- - /** *

    Deletes all 'space' characters from a String as defined by * {@link Character#isSpace(char)}.

    @@ -2164,7 +2145,6 @@ public class StringUtils { // Replacing //----------------------------------------------------------------------- - /** *

    Replaces a String with another String inside a larger String, once.

    * @@ -2264,7 +2244,6 @@ public class StringUtils { // Replace, character based //----------------------------------------------------------------------- - /** *

    Replaces all occurrances of a character in a String with another. * This is a null-safe version of {@link String#replace(char, char)}.

    @@ -2364,7 +2343,6 @@ public class StringUtils { // Overlay //----------------------------------------------------------------------- - /** *

    Overlays part of a String with another String.

    * @@ -2402,7 +2380,6 @@ public class StringUtils { // Chomping //----------------------------------------------------------------------- - /** *

    Removes one newline from end of a String if it's there, * otherwise leave it alone. A newline is "\n", @@ -2595,7 +2572,6 @@ public class StringUtils { // Chopping //----------------------------------------------------------------------- - /** *

    Remove the last character from a String.

    * @@ -2667,7 +2643,6 @@ public class StringUtils { // Conversion //----------------------------------------------------------------------- - /** *

    Escapes any values it finds into their String form.

    * @@ -2690,7 +2665,6 @@ public class StringUtils { // Padding //----------------------------------------------------------------------- - /** *

    Repeat a String repeat times to form a * new String.

    @@ -3010,7 +2984,6 @@ public class StringUtils { // Centering //----------------------------------------------------------------------- - /** *

    Centers a String in a larger String of size size * using the space character (' ').

    @@ -3121,7 +3094,6 @@ public class StringUtils { // Case conversion //----------------------------------------------------------------------- - /** *

    Converts a String to upper case as per {@link String#toUpperCase()}.

    * @@ -3350,7 +3322,6 @@ public class StringUtils { // Nested extraction //----------------------------------------------------------------------- - /** *

    Gets the String that is nested in between two instances of the * same String.

    @@ -3415,7 +3386,6 @@ public class StringUtils { // Count matches //----------------------------------------------------------------------- - /** *

    Counts how many times the substring appears in the larger String.

    * @@ -3450,7 +3420,6 @@ public class StringUtils { // Character Tests //----------------------------------------------------------------------- - /** *

    Checks if the String contains only unicode letters.

    * @@ -3689,7 +3658,6 @@ public class StringUtils { // Defaults //----------------------------------------------------------------------- - /** *

    Returns either the passed in String, * or if the String is null, an empty String ("").

    @@ -3729,7 +3697,6 @@ public class StringUtils { // Reversing //----------------------------------------------------------------------- - /** *

    Reverses a String as per {@link StringBuffer#reverse()}.

    * @@ -3818,7 +3785,6 @@ public class StringUtils { // Abbreviating //----------------------------------------------------------------------- - /** *

    Abbreviates a String using ellipses. This will turn * "Now is the time for all good men" into "Now is the time for..."

    @@ -3918,7 +3884,6 @@ public class StringUtils { // Difference //----------------------------------------------------------------------- - /** *

    Compares two Strings, and returns the portion where they differ. * (More precisely, return the remainder of the second String, @@ -4001,7 +3966,6 @@ public class StringUtils { // Misc //----------------------------------------------------------------------- - /** *

    Find the Levenshtein distance between two Strings.

    * diff --git a/src/java/org/apache/commons/lang/WordWrapUtils.java b/src/java/org/apache/commons/lang/WordWrapUtils.java index f3fc1aba5..be4fb3e4b 100644 --- a/src/java/org/apache/commons/lang/WordWrapUtils.java +++ b/src/java/org/apache/commons/lang/WordWrapUtils.java @@ -67,7 +67,7 @@ import java.util.StringTokenizer; * @author Stephen Colebourne * @author Henning P. Schmiedehausen * @author Gary Gregory - * @version $Id: WordWrapUtils.java,v 1.7 2003/07/19 20:22:36 scolebourne Exp $ + * @version $Id: WordWrapUtils.java,v 1.8 2003/08/01 20:45:17 scolebourne Exp $ */ public class WordWrapUtils { @@ -84,7 +84,6 @@ public class WordWrapUtils { // Wrapping //-------------------------------------------------------------------------- - /** *

    Wraps a block of text to a specified line length.

    *