File formatting for clarity

git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@137548 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Stephen Colebourne 2003-08-01 20:45:17 +00:00
parent 035055e826
commit a2bb66002d
10 changed files with 52 additions and 68 deletions

View File

@ -60,6 +60,7 @@ import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder; import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder; import org.apache.commons.lang.builder.ToStringBuilder;
import org.apache.commons.lang.builder.ToStringStyle; import org.apache.commons.lang.builder.ToStringStyle;
/** /**
* <p><code>ArrayUtils</code> contains utility methods for working with * <p><code>ArrayUtils</code> contains utility methods for working with
* arrays.</p> * arrays.</p>
@ -75,7 +76,7 @@ import org.apache.commons.lang.builder.ToStringStyle;
* @author Nikolay Metchev * @author Nikolay Metchev
* @author Matthew Hawthorne * @author Matthew Hawthorne
* @since 2.0 * @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 { public class ArrayUtils {
@ -228,6 +229,7 @@ public class ArrayUtils {
return new EqualsBuilder().append(array1, array2).isEquals(); return new EqualsBuilder().append(array1, array2).isEquals();
} }
// To map
//----------------------------------------------------------------------- //-----------------------------------------------------------------------
/** /**
* <p>Converts the given array into a {@link java.util.Map}. Each element of the array * <p>Converts the given array into a {@link java.util.Map}. Each element of the array

View File

@ -66,7 +66,7 @@ import org.apache.commons.lang.math.NumberUtils;
* @author Stephen Colebourne * @author Stephen Colebourne
* @author Matthew Hawthorne * @author Matthew Hawthorne
* @since 2.0 * @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 { public class BooleanUtils {
@ -98,7 +98,7 @@ public class BooleanUtils {
} }
// boolean Boolean methods // boolean Boolean methods
//-------------------------------------------------------------------------- //-----------------------------------------------------------------------
/** /**
* <p>Boolean factory that avoids creating new Boolean objecs all the time.</p> * <p>Boolean factory that avoids creating new Boolean objecs all the time.</p>
* *
@ -141,7 +141,7 @@ public class BooleanUtils {
} }
// Integer to Boolean methods // Integer to Boolean methods
//-------------------------------------------------------------------------- //-----------------------------------------------------------------------
/** /**
* <p>Convert an int to a boolean using the convention that <code>zero</code> * <p>Convert an int to a boolean using the convention that <code>zero</code>
* is <code>false</code>.</p> * is <code>false</code>.</p>
@ -285,7 +285,7 @@ public class BooleanUtils {
} }
// Boolean to Integer methods // Boolean to Integer methods
//-------------------------------------------------------------------------- //-----------------------------------------------------------------------
/** /**
* <p>Convert a boolean to an int using the convention that * <p>Convert a boolean to an int using the convention that
* <code>zero</code> is <code>false</code>.</p> * <code>zero</code> is <code>false</code>.</p>
@ -386,7 +386,7 @@ public class BooleanUtils {
} }
// String to Boolean methods // String to Boolean methods
//-------------------------------------------------------------------------- //-----------------------------------------------------------------------
/** /**
* <p>Converts a String to a Boolean.</p> * <p>Converts a String to a Boolean.</p>
* *
@ -452,7 +452,7 @@ public class BooleanUtils {
} }
// String to boolean methods // String to boolean methods
//-------------------------------------------------------------------------- //-----------------------------------------------------------------------
/** /**
* <p>Converts a String to a boolean.</p> * <p>Converts a String to a boolean.</p>
* *
@ -505,7 +505,7 @@ public class BooleanUtils {
} }
// Boolean to String methods // Boolean to String methods
//-------------------------------------------------------------------------- //-----------------------------------------------------------------------
/** /**
* <p>Converts a Boolean to a String returning <code>'true'</code>, * <p>Converts a Boolean to a String returning <code>'true'</code>,
* <code>'false'</code>, or <code>null</code>.</p> * <code>'false'</code>, or <code>null</code>.</p>
@ -562,7 +562,7 @@ public class BooleanUtils {
} }
// boolean to String methods // boolean to String methods
//-------------------------------------------------------------------------- //-----------------------------------------------------------------------
/** /**
* <p>Converts a boolean to a String returning <code>'true'</code> * <p>Converts a boolean to a String returning <code>'true'</code>
* or <code>'false'</code>.</p> * or <code>'false'</code>.</p>
@ -614,7 +614,7 @@ public class BooleanUtils {
} }
// xor methods // xor methods
// -------------------------------------------------------------------------- // ----------------------------------------------------------------------
/** /**
* <p>Performs an xor on a set of booleans.</p> * <p>Performs an xor on a set of booleans.</p>
* *

View File

@ -63,7 +63,7 @@ package org.apache.commons.lang;
* @author <a href="bayard@generationjava.com">Henri Yandell</a> * @author <a href="bayard@generationjava.com">Henri Yandell</a>
* @author Stephen Colebourne * @author Stephen Colebourne
* @since 1.0 * @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 { public class CharSetUtils {
@ -77,6 +77,7 @@ public class CharSetUtils {
public CharSetUtils() { public CharSetUtils() {
} }
// Factory
//----------------------------------------------------------------------- //-----------------------------------------------------------------------
/** /**
* <p>Creates a <code>CharSetUtils</code> object which allows a certain amount of * <p>Creates a <code>CharSetUtils</code> object which allows a certain amount of
@ -132,6 +133,7 @@ public class CharSetUtils {
return new CharSet(set); return new CharSet(set);
} }
// Squeeze
//----------------------------------------------------------------------- //-----------------------------------------------------------------------
/** /**
* <p>Squeezes any repititions of a character that is mentioned in the * <p>Squeezes any repititions of a character that is mentioned in the
@ -197,6 +199,7 @@ public class CharSetUtils {
return buffer.toString(); return buffer.toString();
} }
// Count
//----------------------------------------------------------------------- //-----------------------------------------------------------------------
/** /**
* <p>Takes an argument in set-syntax, see evaluateSet, * <p>Takes an argument in set-syntax, see evaluateSet,
@ -255,6 +258,7 @@ public class CharSetUtils {
return count; return count;
} }
// Keep
//----------------------------------------------------------------------- //-----------------------------------------------------------------------
/** /**
* <p>Takes an argument in set-syntax, see evaluateSet, * <p>Takes an argument in set-syntax, see evaluateSet,
@ -311,6 +315,7 @@ public class CharSetUtils {
return modify(str, set, true); return modify(str, set, true);
} }
// Delete
//----------------------------------------------------------------------- //-----------------------------------------------------------------------
/** /**
* <p>Takes an argument in set-syntax, see evaluateSet, * <p>Takes an argument in set-syntax, see evaluateSet,
@ -376,6 +381,7 @@ public class CharSetUtils {
return buffer.toString(); return buffer.toString();
} }
// Translate
//----------------------------------------------------------------------- //-----------------------------------------------------------------------
/** /**
* <p>Translate characters in a String. * <p>Translate characters in a String.

View File

@ -65,7 +65,7 @@ import java.util.List;
* @author Stephen Colebourne * @author Stephen Colebourne
* @author <a href="mailto:ggregory@seagullsw.com">Gary Gregory</a> * @author <a href="mailto:ggregory@seagullsw.com">Gary Gregory</a>
* @since 2.0 * @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 { public class ClassUtils {
@ -100,8 +100,8 @@ public class ClassUtils {
public ClassUtils() { public ClassUtils() {
} }
// ------------------------------------------------------------------------- // Short class name
// ----------------------------------------------------------------------
/** /**
* <p>Gets the class name minus the package name for an <code>Object</code>.</p> * <p>Gets the class name minus the package name for an <code>Object</code>.</p>
* *
@ -157,8 +157,8 @@ public class ClassUtils {
return new String(chars, lastDot, chars.length - lastDot); return new String(chars, lastDot, chars.length - lastDot);
} }
// ------------------------------------------------------------------------- // Package name
// ----------------------------------------------------------------------
/** /**
* <p>Gets the package name of an <code>Object</code>.</p> * <p>Gets the package name of an <code>Object</code>.</p>
* *
@ -209,8 +209,8 @@ public class ClassUtils {
return className.substring(0, i); return className.substring(0, i);
} }
// ------------------------------------------------------------------------- // Superclasses/Superinterfaces
// ----------------------------------------------------------------------
/** /**
* <p>Gets a <code>List</code> of superclasses for the given class.</p> * <p>Gets a <code>List</code> of superclasses for the given class.</p>
* *
@ -321,8 +321,8 @@ public class ClassUtils {
// return null; // return null;
// } // }
// ------------------------------------------------------------------------- // Convert list
// ----------------------------------------------------------------------
/** /**
* <p>Given a <code>List</code> of class names, this method converts them into classes.</p> * <p>Given a <code>List</code> of class names, this method converts them into classes.</p>
* *
@ -379,8 +379,8 @@ public class ClassUtils {
return classNames; return classNames;
} }
// ------------------------------------------------------------------------- // Is assignable
// ----------------------------------------------------------------------
/** /**
* <p>Checks if an array of Classes can be assigned to another array of Classes.</p> * <p>Checks if an array of Classes can be assigned to another array of Classes.</p>
* *
@ -514,6 +514,8 @@ public class ClassUtils {
return toClass.isAssignableFrom(cls); return toClass.isAssignableFrom(cls);
} }
// Inner class
// ----------------------------------------------------------------------
/** /**
* <p>Is the specified class an inner class or static nested class.</p> * <p>Is the specified class an inner class or static nested class.</p>
* *

View File

@ -68,7 +68,7 @@ import java.io.Serializable;
* @author Stephen Colebourne * @author Stephen Colebourne
* @author <a href="mailto:ggregory@seagullsw.com">Gary Gregory</a> * @author <a href="mailto:ggregory@seagullsw.com">Gary Gregory</a>
* @since 1.0 * @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 { public class ObjectUtils {
@ -101,6 +101,7 @@ public class ObjectUtils {
public ObjectUtils() { public ObjectUtils() {
} }
// Defaulting
//----------------------------------------------------------------------- //-----------------------------------------------------------------------
/** /**
* <p>Returns a default value if the object passed is * <p>Returns a default value if the object passed is
@ -151,6 +152,7 @@ public class ObjectUtils {
return object1.equals(object2); return object1.equals(object2);
} }
// Identity ToString
//----------------------------------------------------------------------- //-----------------------------------------------------------------------
/** /**
* <p>Gets the toString that would be produced by <code>Object</code> * <p>Gets the toString that would be produced by <code>Object</code>
@ -205,6 +207,7 @@ public class ObjectUtils {
.append(Integer.toHexString(System.identityHashCode(object))); .append(Integer.toHexString(System.identityHashCode(object)));
} }
// ToString
//----------------------------------------------------------------------- //-----------------------------------------------------------------------
/** /**
* <p>Gets the <code>toString</code> of an <code>Object</code> returning * <p>Gets the <code>toString</code> of an <code>Object</code> returning
@ -244,6 +247,7 @@ public class ObjectUtils {
return (obj == null ? nullStr : obj.toString()); return (obj == null ? nullStr : obj.toString());
} }
// Null
//----------------------------------------------------------------------- //-----------------------------------------------------------------------
/** /**
* <p>Class used as a null placeholder where <code>null</code> * <p>Class used as a null placeholder where <code>null</code>

View File

@ -64,7 +64,7 @@ import java.util.Random;
* @author <a href="mailto:ggregory@seagullsw.com">Gary Gregory</a> * @author <a href="mailto:ggregory@seagullsw.com">Gary Gregory</a>
* @author Phil Steitz * @author Phil Steitz
* @since 1.0 * @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 { public class RandomStringUtils {
@ -86,6 +86,8 @@ public class RandomStringUtils {
public RandomStringUtils() { public RandomStringUtils() {
} }
// Random
//-----------------------------------------------------------------------
/** /**
* <p>Creates a random string whose length is the number of characters * <p>Creates a random string whose length is the number of characters
* specified.</p> * specified.</p>

View File

@ -81,7 +81,7 @@ import java.io.Serializable;
* @author Stephen Colebourne * @author Stephen Colebourne
* @author Jeff Varszegi * @author Jeff Varszegi
* @since 1.0 * @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 { public class SerializationUtils {
@ -96,6 +96,8 @@ public class SerializationUtils {
super(); super();
} }
// Clone
//-----------------------------------------------------------------------
/** /**
* <p>Deep clone an <code>Object</code> using serialization.</p> * <p>Deep clone an <code>Object</code> using serialization.</p>
* *
@ -113,6 +115,8 @@ public class SerializationUtils {
return deserialize(serialize(object)); return deserialize(serialize(object));
} }
// Serialize
//-----------------------------------------------------------------------
/** /**
* <p>Serializes an <code>Object</code> to the specified stream.</p> * <p>Serializes an <code>Object</code> to the specified stream.</p>
* *
@ -165,6 +169,8 @@ public class SerializationUtils {
return baos.toByteArray(); return baos.toByteArray();
} }
// Deserialize
//-----------------------------------------------------------------------
/** /**
* <p>Deserializes an <code>Object</code> from the specified stream.</p> * <p>Deserializes an <code>Object</code> from the specified stream.</p>
* *

View File

@ -73,7 +73,7 @@ import org.apache.commons.lang.exception.NestableRuntimeException;
* @author <a href="mailto:ggregory@seagullsw.com">Gary Gregory</a> * @author <a href="mailto:ggregory@seagullsw.com">Gary Gregory</a>
* @author Phil Steitz * @author Phil Steitz
* @since 2.0 * @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 { public class StringEscapeUtils {
@ -429,7 +429,6 @@ public class StringEscapeUtils {
// HTML and XML // HTML and XML
//-------------------------------------------------------------------------- //--------------------------------------------------------------------------
/** /**
* <p>Escapes the characters in a <code>String</code> using HTML entities.</p> * <p>Escapes the characters in a <code>String</code> using HTML entities.</p>
* *

View File

@ -76,10 +76,8 @@ import java.util.List;
* - does String contain only/none of these characters * - does String contain only/none of these characters
* <li><b>SubString/Left/Right/Mid/SubStringBefore/SubStringAfter</b> * <li><b>SubString/Left/Right/Mid/SubStringBefore/SubStringAfter</b>
* - null-safe substring extraction * - null-safe substring extraction
* <li><b>Split</b> * <li><b>Split/Join</b>
* - splits a String into an array of subtrings based on a separator * - splits a String into an array of substrings and vice versa
* <li><b>Join/Concatenate</b>
* - joins an array of Strings into one with optional separator
* <li><b>Replace/Delete/Overlay</b> * <li><b>Replace/Delete/Overlay</b>
* - Searches a String and replaces one String with another * - Searches a String and replaces one String with another
* <li><b>Chomp/Chop</b> * <li><b>Chomp/Chop</b>
@ -146,7 +144,7 @@ import java.util.List;
* @author <a href="mailto:ggregory@seagullsw.com">Gary Gregory</a> * @author <a href="mailto:ggregory@seagullsw.com">Gary Gregory</a>
* @author Phil Steitz * @author Phil Steitz
* @since 1.0 * @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 { public class StringUtils {
// Performance testing notes (JDK 1.4, Jul03, scolebourne) // Performance testing notes (JDK 1.4, Jul03, scolebourne)
@ -195,7 +193,6 @@ public class StringUtils {
// Empty checks // Empty checks
//----------------------------------------------------------------------- //-----------------------------------------------------------------------
/** /**
* <p>Checks if a String is empty ("") or null.</p> * <p>Checks if a String is empty ("") or null.</p>
* *
@ -293,7 +290,6 @@ public class StringUtils {
// Trim // Trim
//----------------------------------------------------------------------- //-----------------------------------------------------------------------
/** /**
* <p>Removes control characters (char &lt;= 32) from both * <p>Removes control characters (char &lt;= 32) from both
* ends of this String, handling <code>null</code> by returning * ends of this String, handling <code>null</code> by returning
@ -396,7 +392,6 @@ public class StringUtils {
// Stripping // Stripping
//----------------------------------------------------------------------- //-----------------------------------------------------------------------
/** /**
* <p>Strips whitespace from the start and end of a String.</p> * <p>Strips whitespace from the start and end of a String.</p>
* *
@ -602,7 +597,6 @@ public class StringUtils {
// StripAll // StripAll
//----------------------------------------------------------------------- //-----------------------------------------------------------------------
/** /**
* <p>Strips whitespace from the start and end of every String in an array. * <p>Strips whitespace from the start and end of every String in an array.
* Whitespace is defined by {@link Character#isWhitespace(char)}.</p> * Whitespace is defined by {@link Character#isWhitespace(char)}.</p>
@ -665,7 +659,6 @@ public class StringUtils {
// Equals // Equals
//----------------------------------------------------------------------- //-----------------------------------------------------------------------
/** /**
* <p>Compares two Strings, returning <code>true</code> if they are equal.</p> * <p>Compares two Strings, returning <code>true</code> if they are equal.</p>
* *
@ -717,7 +710,6 @@ public class StringUtils {
// IndexOf // IndexOf
//----------------------------------------------------------------------- //-----------------------------------------------------------------------
/** /**
* <p>Finds the first index within a String, handling <code>null</code>. * <p>Finds the first index within a String, handling <code>null</code>.
* This method uses {@link String#indexOf(int)}.</p> * This method uses {@link String#indexOf(int)}.</p>
@ -845,7 +837,6 @@ public class StringUtils {
// LastIndexOf // LastIndexOf
//----------------------------------------------------------------------- //-----------------------------------------------------------------------
/** /**
* <p>Finds the last index within a String, handling <code>null</code>. * <p>Finds the last index within a String, handling <code>null</code>.
* This method uses {@link String#lastIndexOf(int)}.</p> * This method uses {@link String#lastIndexOf(int)}.</p>
@ -968,7 +959,6 @@ public class StringUtils {
// Contains // Contains
//----------------------------------------------------------------------- //-----------------------------------------------------------------------
/** /**
* <p>Checks if String contains a search character, handling <code>null</code>. * <p>Checks if String contains a search character, handling <code>null</code>.
* This method uses {@link String#indexOf(int)}.</p> * This method uses {@link String#indexOf(int)}.</p>
@ -1023,7 +1013,6 @@ public class StringUtils {
// IndexOfAny // IndexOfAny
//----------------------------------------------------------------------- //-----------------------------------------------------------------------
/** /**
* <p>Find the first index of any of a set of potential substrings.</p> * <p>Find the first index of any of a set of potential substrings.</p>
* *
@ -1125,7 +1114,6 @@ public class StringUtils {
// IndexOfAnyBut // IndexOfAnyBut
//----------------------------------------------------------------------- //-----------------------------------------------------------------------
/** /**
* <p>Search a String to find the first index of any * <p>Search a String to find the first index of any
* character not in the given set of characters.</p> * character not in the given set of characters.</p>
@ -1187,7 +1175,6 @@ public class StringUtils {
// ContainsOnly // ContainsOnly
//----------------------------------------------------------------------- //-----------------------------------------------------------------------
/** /**
* <p>Checks if the String contains only certain characters.</p> * <p>Checks if the String contains only certain characters.</p>
* *
@ -1253,7 +1240,6 @@ public class StringUtils {
// ContainsNone // ContainsNone
//----------------------------------------------------------------------- //-----------------------------------------------------------------------
/** /**
* <p>Checks that the String does not contain certain characters.</p> * <p>Checks that the String does not contain certain characters.</p>
* *
@ -1322,7 +1308,6 @@ public class StringUtils {
// Substring // Substring
//----------------------------------------------------------------------- //-----------------------------------------------------------------------
/** /**
* <p>Gets a substring from the specified String avoiding exceptions.</p> * <p>Gets a substring from the specified String avoiding exceptions.</p>
* *
@ -1437,7 +1422,6 @@ public class StringUtils {
// Left/Right/Mid // Left/Right/Mid
//----------------------------------------------------------------------- //-----------------------------------------------------------------------
/** /**
* <p>Gets the leftmost <code>len</code> characters of a String.</p> * <p>Gets the leftmost <code>len</code> characters of a String.</p>
* *
@ -1555,7 +1539,6 @@ public class StringUtils {
// SubStringAfter/SubStringBefore // SubStringAfter/SubStringBefore
//----------------------------------------------------------------------- //-----------------------------------------------------------------------
/** /**
* <p>Gets the substring before the first occurance of a separator. * <p>Gets the substring before the first occurance of a separator.
* The separator is not returned.</p> * The separator is not returned.</p>
@ -1710,7 +1693,6 @@ public class StringUtils {
// Splitting // Splitting
//----------------------------------------------------------------------- //-----------------------------------------------------------------------
/** /**
* <p>Splits the provided text into an array, using whitespace as the * <p>Splits the provided text into an array, using whitespace as the
* separator. * separator.
@ -2100,7 +2082,6 @@ public class StringUtils {
// Delete // Delete
//----------------------------------------------------------------------- //-----------------------------------------------------------------------
/** /**
* <p>Deletes all 'space' characters from a String as defined by * <p>Deletes all 'space' characters from a String as defined by
* {@link Character#isSpace(char)}.</p> * {@link Character#isSpace(char)}.</p>
@ -2164,7 +2145,6 @@ public class StringUtils {
// Replacing // Replacing
//----------------------------------------------------------------------- //-----------------------------------------------------------------------
/** /**
* <p>Replaces a String with another String inside a larger String, once.</p> * <p>Replaces a String with another String inside a larger String, once.</p>
* *
@ -2264,7 +2244,6 @@ public class StringUtils {
// Replace, character based // Replace, character based
//----------------------------------------------------------------------- //-----------------------------------------------------------------------
/** /**
* <p>Replaces all occurrances of a character in a String with another. * <p>Replaces all occurrances of a character in a String with another.
* This is a null-safe version of {@link String#replace(char, char)}.</p> * This is a null-safe version of {@link String#replace(char, char)}.</p>
@ -2364,7 +2343,6 @@ public class StringUtils {
// Overlay // Overlay
//----------------------------------------------------------------------- //-----------------------------------------------------------------------
/** /**
* <p>Overlays part of a String with another String.</p> * <p>Overlays part of a String with another String.</p>
* *
@ -2402,7 +2380,6 @@ public class StringUtils {
// Chomping // Chomping
//----------------------------------------------------------------------- //-----------------------------------------------------------------------
/** /**
* <p>Removes one newline from end of a String if it's there, * <p>Removes one newline from end of a String if it's there,
* otherwise leave it alone. A newline is &quot;<code>\n</code>&quot;, * otherwise leave it alone. A newline is &quot;<code>\n</code>&quot;,
@ -2595,7 +2572,6 @@ public class StringUtils {
// Chopping // Chopping
//----------------------------------------------------------------------- //-----------------------------------------------------------------------
/** /**
* <p>Remove the last character from a String.</p> * <p>Remove the last character from a String.</p>
* *
@ -2667,7 +2643,6 @@ public class StringUtils {
// Conversion // Conversion
//----------------------------------------------------------------------- //-----------------------------------------------------------------------
/** /**
* <p>Escapes any values it finds into their String form.</p> * <p>Escapes any values it finds into their String form.</p>
* *
@ -2690,7 +2665,6 @@ public class StringUtils {
// Padding // Padding
//----------------------------------------------------------------------- //-----------------------------------------------------------------------
/** /**
* <p>Repeat a String <code>repeat</code> times to form a * <p>Repeat a String <code>repeat</code> times to form a
* new String.</p> * new String.</p>
@ -3010,7 +2984,6 @@ public class StringUtils {
// Centering // Centering
//----------------------------------------------------------------------- //-----------------------------------------------------------------------
/** /**
* <p>Centers a String in a larger String of size <code>size</code> * <p>Centers a String in a larger String of size <code>size</code>
* using the space character (' ').<p> * using the space character (' ').<p>
@ -3121,7 +3094,6 @@ public class StringUtils {
// Case conversion // Case conversion
//----------------------------------------------------------------------- //-----------------------------------------------------------------------
/** /**
* <p>Converts a String to upper case as per {@link String#toUpperCase()}.</p> * <p>Converts a String to upper case as per {@link String#toUpperCase()}.</p>
* *
@ -3350,7 +3322,6 @@ public class StringUtils {
// Nested extraction // Nested extraction
//----------------------------------------------------------------------- //-----------------------------------------------------------------------
/** /**
* <p>Gets the String that is nested in between two instances of the * <p>Gets the String that is nested in between two instances of the
* same String.</p> * same String.</p>
@ -3415,7 +3386,6 @@ public class StringUtils {
// Count matches // Count matches
//----------------------------------------------------------------------- //-----------------------------------------------------------------------
/** /**
* <p>Counts how many times the substring appears in the larger String.</p> * <p>Counts how many times the substring appears in the larger String.</p>
* *
@ -3450,7 +3420,6 @@ public class StringUtils {
// Character Tests // Character Tests
//----------------------------------------------------------------------- //-----------------------------------------------------------------------
/** /**
* <p>Checks if the String contains only unicode letters.</p> * <p>Checks if the String contains only unicode letters.</p>
* *
@ -3689,7 +3658,6 @@ public class StringUtils {
// Defaults // Defaults
//----------------------------------------------------------------------- //-----------------------------------------------------------------------
/** /**
* <p>Returns either the passed in String, * <p>Returns either the passed in String,
* or if the String is <code>null</code>, an empty String ("").</p> * or if the String is <code>null</code>, an empty String ("").</p>
@ -3729,7 +3697,6 @@ public class StringUtils {
// Reversing // Reversing
//----------------------------------------------------------------------- //-----------------------------------------------------------------------
/** /**
* <p>Reverses a String as per {@link StringBuffer#reverse()}.</p> * <p>Reverses a String as per {@link StringBuffer#reverse()}.</p>
* *
@ -3818,7 +3785,6 @@ public class StringUtils {
// Abbreviating // Abbreviating
//----------------------------------------------------------------------- //-----------------------------------------------------------------------
/** /**
* <p>Abbreviates a String using ellipses. This will turn * <p>Abbreviates a String using ellipses. This will turn
* "Now is the time for all good men" into "Now is the time for..."</p> * "Now is the time for all good men" into "Now is the time for..."</p>
@ -3918,7 +3884,6 @@ public class StringUtils {
// Difference // Difference
//----------------------------------------------------------------------- //-----------------------------------------------------------------------
/** /**
* <p>Compares two Strings, and returns the portion where they differ. * <p>Compares two Strings, and returns the portion where they differ.
* (More precisely, return the remainder of the second String, * (More precisely, return the remainder of the second String,
@ -4001,7 +3966,6 @@ public class StringUtils {
// Misc // Misc
//----------------------------------------------------------------------- //-----------------------------------------------------------------------
/** /**
* <p>Find the Levenshtein distance between two Strings.</p> * <p>Find the Levenshtein distance between two Strings.</p>
* *

View File

@ -67,7 +67,7 @@ import java.util.StringTokenizer;
* @author Stephen Colebourne * @author Stephen Colebourne
* @author <a href="mailto:hps@intermeta.de">Henning P. Schmiedehausen</a> * @author <a href="mailto:hps@intermeta.de">Henning P. Schmiedehausen</a>
* @author <a href="mailto:ggregory@seagullsw.com">Gary Gregory</a> * @author <a href="mailto:ggregory@seagullsw.com">Gary Gregory</a>
* @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 { public class WordWrapUtils {
@ -84,7 +84,6 @@ public class WordWrapUtils {
// Wrapping // Wrapping
//-------------------------------------------------------------------------- //--------------------------------------------------------------------------
/** /**
* <p>Wraps a block of text to a specified line length.</p> * <p>Wraps a block of text to a specified line length.</p>
* *