commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From scolebou...@apache.org
Subject cvs commit: jakarta-commons/lang/src/java/org/apache/commons/lang WordWrapUtils.java StringEscapeUtils.java CharSetUtils.java BooleanUtils.java RandomStringUtils.java ClassUtils.java ObjectUtils.java ArrayUtils.java SerializationUtils.java StringUtils.java
Date Fri, 01 Aug 2003 20:45:18 GMT
scolebourne    2003/08/01 13:45:18

  Modified:    lang/src/java/org/apache/commons/lang WordWrapUtils.java
                        StringEscapeUtils.java CharSetUtils.java
                        BooleanUtils.java RandomStringUtils.java
                        ClassUtils.java ObjectUtils.java ArrayUtils.java
                        SerializationUtils.java StringUtils.java
  Log:
  File formatting for clarity
  
  Revision  Changes    Path
  1.8       +1 -2      jakarta-commons/lang/src/java/org/apache/commons/lang/WordWrapUtils.java
  
  Index: WordWrapUtils.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/lang/src/java/org/apache/commons/lang/WordWrapUtils.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- WordWrapUtils.java	19 Jul 2003 20:22:36 -0000	1.7
  +++ WordWrapUtils.java	1 Aug 2003 20:45:17 -0000	1.8
  @@ -84,7 +84,6 @@
   
       // Wrapping
       //--------------------------------------------------------------------------
  -
       /**
        * <p>Wraps a block of text to a specified line length.</p>
        *
  
  
  
  1.23      +1 -2      jakarta-commons/lang/src/java/org/apache/commons/lang/StringEscapeUtils.java
  
  Index: StringEscapeUtils.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/lang/src/java/org/apache/commons/lang/StringEscapeUtils.java,v
  retrieving revision 1.22
  retrieving revision 1.23
  diff -u -r1.22 -r1.23
  --- StringEscapeUtils.java	31 Jul 2003 23:45:28 -0000	1.22
  +++ StringEscapeUtils.java	1 Aug 2003 20:45:17 -0000	1.23
  @@ -429,7 +429,6 @@
   
       // HTML and XML
       //--------------------------------------------------------------------------
  -
       /**
        * <p>Escapes the characters in a <code>String</code> using HTML
entities.</p>
        *
  
  
  
  1.19      +7 -1      jakarta-commons/lang/src/java/org/apache/commons/lang/CharSetUtils.java
  
  Index: CharSetUtils.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/lang/src/java/org/apache/commons/lang/CharSetUtils.java,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- CharSetUtils.java	31 Jul 2003 21:32:47 -0000	1.18
  +++ CharSetUtils.java	1 Aug 2003 20:45:17 -0000	1.19
  @@ -77,6 +77,7 @@
       public CharSetUtils() {
       }
   
  +    // Factory
       //-----------------------------------------------------------------------
       /**
        * <p>Creates a <code>CharSetUtils</code> object which allows a certain
amount of
  @@ -132,6 +133,7 @@
           return new CharSet(set); 
       }
   
  +    // Squeeze
       //-----------------------------------------------------------------------
       /**
        * <p>Squeezes any repititions of a character that is mentioned in the
  @@ -197,6 +199,7 @@
           return buffer.toString();
       }
   
  +    // Count
       //-----------------------------------------------------------------------
       /**
        * <p>Takes an argument in set-syntax, see evaluateSet,
  @@ -255,6 +258,7 @@
           return count;
       }
   
  +    // Keep
       //-----------------------------------------------------------------------
       /**
        * <p>Takes an argument in set-syntax, see evaluateSet,
  @@ -311,6 +315,7 @@
           return modify(str, set, true);
       }
   
  +    // Delete
       //-----------------------------------------------------------------------
       /**
        * <p>Takes an argument in set-syntax, see evaluateSet,
  @@ -376,6 +381,7 @@
           return buffer.toString();
       }
   
  +    // Translate
       //-----------------------------------------------------------------------
       /**
        * <p>Translate characters in a String.
  
  
  
  1.12      +9 -9      jakarta-commons/lang/src/java/org/apache/commons/lang/BooleanUtils.java
  
  Index: BooleanUtils.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/lang/src/java/org/apache/commons/lang/BooleanUtils.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- BooleanUtils.java	31 Jul 2003 23:55:57 -0000	1.11
  +++ BooleanUtils.java	1 Aug 2003 20:45:17 -0000	1.12
  @@ -98,7 +98,7 @@
       }
       
       // boolean Boolean methods
  -    //--------------------------------------------------------------------------
  +    //-----------------------------------------------------------------------
       /**
        * <p>Boolean factory that avoids creating new Boolean objecs all the time.</p>
        * 
  @@ -141,7 +141,7 @@
       }
       
       // Integer to Boolean methods
  -    //--------------------------------------------------------------------------
  +    //-----------------------------------------------------------------------
       /**
        * <p>Convert an int to a boolean using the convention that <code>zero</code>
        * is <code>false</code>.</p>
  @@ -285,7 +285,7 @@
       }
       
       // Boolean to Integer methods
  -    //--------------------------------------------------------------------------
  +    //-----------------------------------------------------------------------
       /**
        * <p>Convert a boolean to an int using the convention that
        * <code>zero</code> is <code>false</code>.</p>
  @@ -386,7 +386,7 @@
       }
       
       // String to Boolean methods
  -    //--------------------------------------------------------------------------
  +    //-----------------------------------------------------------------------
       /**
        * <p>Converts a String to a Boolean.</p>
        * 
  @@ -452,7 +452,7 @@
       }
   
       // String to boolean methods
  -    //--------------------------------------------------------------------------
  +    //-----------------------------------------------------------------------
       /**
        * <p>Converts a String to a boolean.</p>
        * 
  @@ -505,7 +505,7 @@
       }
   
       // Boolean to String methods
  -    //--------------------------------------------------------------------------
  +    //-----------------------------------------------------------------------
       /**
        * <p>Converts a Boolean to a String returning <code>'true'</code>,
        * <code>'false'</code>, or <code>null</code>.</p>
  @@ -562,7 +562,7 @@
       }
       
       // boolean to String methods
  -    //--------------------------------------------------------------------------
  +    //-----------------------------------------------------------------------
       /**
        * <p>Converts a boolean to a String returning <code>'true'</code>
        * or <code>'false'</code>.</p>
  @@ -614,7 +614,7 @@
       }
       
       // xor methods
  -    //  --------------------------------------------------------------------------
  +    // ----------------------------------------------------------------------
       /**
        * <p>Performs an xor on a set of booleans.</p>
        * 
  
  
  
  1.21      +3 -1      jakarta-commons/lang/src/java/org/apache/commons/lang/RandomStringUtils.java
  
  Index: RandomStringUtils.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/lang/src/java/org/apache/commons/lang/RandomStringUtils.java,v
  retrieving revision 1.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- RandomStringUtils.java	31 Jul 2003 23:24:35 -0000	1.20
  +++ RandomStringUtils.java	1 Aug 2003 20:45:17 -0000	1.21
  @@ -86,6 +86,8 @@
       public RandomStringUtils() {
       }
   
  +    // Random
  +    //-----------------------------------------------------------------------
       /**
        * <p>Creates a random string whose length is the number of characters
        * specified.</p>
  
  
  
  1.19      +13 -11    jakarta-commons/lang/src/java/org/apache/commons/lang/ClassUtils.java
  
  Index: ClassUtils.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/lang/src/java/org/apache/commons/lang/ClassUtils.java,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- ClassUtils.java	31 Jul 2003 23:47:20 -0000	1.18
  +++ ClassUtils.java	1 Aug 2003 20:45:17 -0000	1.19
  @@ -100,8 +100,8 @@
       public ClassUtils() {
       }
   
  -    // -------------------------------------------------------------------------
  -    
  +    // Short class name
  +    // ----------------------------------------------------------------------
       /**
        * <p>Gets the class name minus the package name for an <code>Object</code>.</p>
        * 
  @@ -157,8 +157,8 @@
           return new String(chars, lastDot, chars.length - lastDot);
       }
       
  -    // -------------------------------------------------------------------------
  -    
  +    // Package name
  +    // ----------------------------------------------------------------------
       /**
        * <p>Gets the package name of an <code>Object</code>.</p>
        * 
  @@ -209,8 +209,8 @@
           return className.substring(0, i);
       }
       
  -    // -------------------------------------------------------------------------
  -    
  +    // Superclasses/Superinterfaces
  +    // ----------------------------------------------------------------------
       /**
        * <p>Gets a <code>List</code> of superclasses for the given class.</p>
        * 
  @@ -321,8 +321,8 @@
   //        return null;
   //    }
   
  -    // -------------------------------------------------------------------------
  -    
  +    // Convert list
  +    // ----------------------------------------------------------------------
       /**
        * <p>Given a <code>List</code> of class names, this method converts
them into classes.</p>
        *
  @@ -379,8 +379,8 @@
           return classNames;
       }
       
  -    // -------------------------------------------------------------------------
  -    
  +    // Is assignable
  +    // ----------------------------------------------------------------------
       /**
        * <p>Checks if an array of Classes can be assigned to another array of Classes.</p>
        *
  @@ -514,6 +514,8 @@
           return toClass.isAssignableFrom(cls);
       }
       
  +    // Inner class
  +    // ----------------------------------------------------------------------
       /**
        * <p>Is the specified class an inner class or static nested class.</p>
        * 
  
  
  
  1.16      +5 -1      jakarta-commons/lang/src/java/org/apache/commons/lang/ObjectUtils.java
  
  Index: ObjectUtils.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/lang/src/java/org/apache/commons/lang/ObjectUtils.java,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- ObjectUtils.java	26 Jul 2003 00:45:27 -0000	1.15
  +++ ObjectUtils.java	1 Aug 2003 20:45:17 -0000	1.16
  @@ -101,6 +101,7 @@
       public ObjectUtils() {
       }
   
  +    // Defaulting
       //-----------------------------------------------------------------------
       /**
        * <p>Returns a default value if the object passed is
  @@ -151,6 +152,7 @@
           return object1.equals(object2);
       }
       
  +    // Identity ToString
       //-----------------------------------------------------------------------
       /**
        * <p>Gets the toString that would be produced by <code>Object</code>
  @@ -205,6 +207,7 @@
               .append(Integer.toHexString(System.identityHashCode(object)));
       }
   
  +    // ToString
       //-----------------------------------------------------------------------
       /**
        * <p>Gets the <code>toString</code> of an <code>Object</code>
returning
  @@ -244,6 +247,7 @@
           return (obj == null ? nullStr : obj.toString());
       }
   
  +    // Null
       //-----------------------------------------------------------------------
       /**
        * <p>Class used as a null placeholder where <code>null</code>
  
  
  
  1.21      +3 -1      jakarta-commons/lang/src/java/org/apache/commons/lang/ArrayUtils.java
  
  Index: ArrayUtils.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/lang/src/java/org/apache/commons/lang/ArrayUtils.java,v
  retrieving revision 1.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- ArrayUtils.java	31 Jul 2003 23:45:28 -0000	1.20
  +++ ArrayUtils.java	1 Aug 2003 20:45:17 -0000	1.21
  @@ -60,6 +60,7 @@
   import org.apache.commons.lang.builder.HashCodeBuilder;
   import org.apache.commons.lang.builder.ToStringBuilder;
   import org.apache.commons.lang.builder.ToStringStyle;
  +
   /**
    * <p><code>ArrayUtils</code> contains utility methods for working with
    * arrays.</p>
  @@ -228,6 +229,7 @@
           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
  
  
  
  1.9       +7 -1      jakarta-commons/lang/src/java/org/apache/commons/lang/SerializationUtils.java
  
  Index: SerializationUtils.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/lang/src/java/org/apache/commons/lang/SerializationUtils.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- SerializationUtils.java	31 Jul 2003 23:45:28 -0000	1.8
  +++ SerializationUtils.java	1 Aug 2003 20:45:17 -0000	1.9
  @@ -96,6 +96,8 @@
           super();
       }
   
  +    // Clone
  +    //-----------------------------------------------------------------------
       /**
        * <p>Deep clone an <code>Object</code> using serialization.</p>
        *
  @@ -113,6 +115,8 @@
           return deserialize(serialize(object));
       }
       
  +    // Serialize
  +    //-----------------------------------------------------------------------
       /**
        * <p>Serializes an <code>Object</code> to the specified stream.</p>
        *
  @@ -165,6 +169,8 @@
           return baos.toByteArray();
       }
   
  +    // Deserialize
  +    //-----------------------------------------------------------------------
       /**
        * <p>Deserializes an <code>Object</code> from the specified stream.</p>
        *
  
  
  
  1.84      +3 -39     jakarta-commons/lang/src/java/org/apache/commons/lang/StringUtils.java
  
  Index: StringUtils.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/lang/src/java/org/apache/commons/lang/StringUtils.java,v
  retrieving revision 1.83
  retrieving revision 1.84
  diff -u -r1.83 -r1.84
  --- StringUtils.java	31 Jul 2003 20:38:26 -0000	1.83
  +++ StringUtils.java	1 Aug 2003 20:45:17 -0000	1.84
  @@ -76,10 +76,8 @@
    *      - does String contain only/none of these characters
    *  <li><b>SubString/Left/Right/Mid/SubStringBefore/SubStringAfter</b>
    *      - null-safe substring extraction
  - *  <li><b>Split</b>
  - *      - splits a String into an array of subtrings based on a separator
  - *  <li><b>Join/Concatenate</b>
  - *      - joins an array of Strings into one with optional separator
  + *  <li><b>Split/Join</b>
  + *      - splits a String into an array of substrings and vice versa
    *  <li><b>Replace/Delete/Overlay</b>
    *      - Searches a String and replaces one String with another
    *  <li><b>Chomp/Chop</b>
  @@ -195,7 +193,6 @@
   
       // Empty checks
       //-----------------------------------------------------------------------
  -
       /**
        * <p>Checks if a String is empty ("") or null.</p>
        * 
  @@ -293,7 +290,6 @@
   
       // Trim
       //-----------------------------------------------------------------------
  -
       /**
        * <p>Removes control characters (char &lt;= 32) from both
        * ends of this String, handling <code>null</code> by returning
  @@ -396,7 +392,6 @@
       
       // Stripping
       //-----------------------------------------------------------------------
  -    
       /**
        * <p>Strips whitespace from the start and end of a String.</p>
        * 
  @@ -602,7 +597,6 @@
   
       // StripAll
       //-----------------------------------------------------------------------
  -    
       /**
        * <p>Strips whitespace from the start and end of every String in an array.
        * Whitespace is defined by {@link Character#isWhitespace(char)}.</p>
  @@ -665,7 +659,6 @@
   
       // Equals
       //-----------------------------------------------------------------------
  -
       /**
        * <p>Compares two Strings, returning <code>true</code> if they are
equal.</p>
        *
  @@ -717,7 +710,6 @@
   
       // IndexOf
       //-----------------------------------------------------------------------
  -    
       /**
        * <p>Finds the first index within a String, handling <code>null</code>.
        * This method uses {@link String#indexOf(int)}.</p>
  @@ -845,7 +837,6 @@
       
       // LastIndexOf
       //-----------------------------------------------------------------------
  -    
       /**
        * <p>Finds the last index within a String, handling <code>null</code>.
        * This method uses {@link String#lastIndexOf(int)}.</p>
  @@ -968,7 +959,6 @@
       
       // Contains
       //-----------------------------------------------------------------------
  -    
       /**
        * <p>Checks if String contains a search character, handling <code>null</code>.
        * This method uses {@link String#indexOf(int)}.</p>
  @@ -1023,7 +1013,6 @@
       
       // IndexOfAny
       //-----------------------------------------------------------------------
  -    
       /**
        * <p>Find the first index of any of a set of potential substrings.</p>
        *
  @@ -1125,7 +1114,6 @@
   
       // IndexOfAnyBut
       //-----------------------------------------------------------------------
  -    
       /**
        * <p>Search a String to find the first index of any
        * character not in the given set of characters.</p>
  @@ -1187,7 +1175,6 @@
   
       // ContainsOnly
       //-----------------------------------------------------------------------
  -    
       /**
        * <p>Checks if the String contains only certain characters.</p>
        *
  @@ -1253,7 +1240,6 @@
       
       // ContainsNone
       //-----------------------------------------------------------------------
  -    
       /**
        * <p>Checks that the String does not contain certain characters.</p>
        *
  @@ -1322,7 +1308,6 @@
       
       // Substring
       //-----------------------------------------------------------------------
  -    
       /**
        * <p>Gets a substring from the specified String avoiding exceptions.</p>
        *
  @@ -1437,7 +1422,6 @@
   
       // Left/Right/Mid
       //-----------------------------------------------------------------------
  -    
       /**
        * <p>Gets the leftmost <code>len</code> characters of a String.</p>
        *
  @@ -1555,7 +1539,6 @@
   
       // SubStringAfter/SubStringBefore
       //-----------------------------------------------------------------------
  -
       /**
        * <p>Gets the substring before the first occurance of a separator.
        * The separator is not returned.</p>
  @@ -1710,7 +1693,6 @@
   
       // Splitting
       //-----------------------------------------------------------------------
  -    
       /**
        * <p>Splits the provided text into an array, using whitespace as the
        * separator.
  @@ -2100,7 +2082,6 @@
   
       // Delete
       //-----------------------------------------------------------------------
  -
       /**
        * <p>Deletes all 'space' characters from a String as defined by
        * {@link Character#isSpace(char)}.</p>
  @@ -2164,7 +2145,6 @@
   
       // Replacing
       //-----------------------------------------------------------------------
  -    
       /**
        * <p>Replaces a String with another String inside a larger String, once.</p>
        * 
  @@ -2264,7 +2244,6 @@
       
       // Replace, character based
       //-----------------------------------------------------------------------
  -
       /**
        * <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>
  @@ -2364,7 +2343,6 @@
   
       // Overlay
       //-----------------------------------------------------------------------
  -
       /**
        * <p>Overlays part of a String with another String.</p>
        *
  @@ -2402,7 +2380,6 @@
   
       // Chomping
       //-----------------------------------------------------------------------
  -
       /**
        * <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;,
  @@ -2595,7 +2572,6 @@
   
       // Chopping
       //-----------------------------------------------------------------------
  -    
       /**
        * <p>Remove the last character from a String.</p>
        *
  @@ -2667,7 +2643,6 @@
   
       // Conversion
       //-----------------------------------------------------------------------
  -    
       /**
        * <p>Escapes any values it finds into their String form.</p>
        *
  @@ -2690,7 +2665,6 @@
   
       // Padding
       //-----------------------------------------------------------------------
  -    
       /**
        * <p>Repeat a String <code>repeat</code> times to form a
        * new String.</p>
  @@ -3010,7 +2984,6 @@
   
       // Centering
       //-----------------------------------------------------------------------
  -    
       /**
        * <p>Centers a String in a larger String of size <code>size</code>
        * using the space character (' ').<p>
  @@ -3121,7 +3094,6 @@
   
       // Case conversion
       //-----------------------------------------------------------------------
  -    
       /**
        * <p>Converts a String to upper case as per {@link String#toUpperCase()}.</p>
        * 
  @@ -3350,7 +3322,6 @@
   
       // Nested extraction
       //-----------------------------------------------------------------------
  -    
       /**
        * <p>Gets the String that is nested in between two instances of the
        * same String.</p>
  @@ -3415,7 +3386,6 @@
   
       // Count matches
       //-----------------------------------------------------------------------
  -    
       /**
        * <p>Counts how many times the substring appears in the larger String.</p>
        *
  @@ -3450,7 +3420,6 @@
   
       // Character Tests
       //-----------------------------------------------------------------------
  -    
       /**
        * <p>Checks if the String contains only unicode letters.</p>
        *
  @@ -3689,7 +3658,6 @@
   
       // Defaults
       //-----------------------------------------------------------------------
  -    
       /**
        * <p>Returns either the passed in String, 
        * or if the String is <code>null</code>, an empty String ("").</p>
  @@ -3729,7 +3697,6 @@
   
       // Reversing
       //-----------------------------------------------------------------------
  -
       /**
        * <p>Reverses a String as per {@link StringBuffer#reverse()}.</p>
        *
  @@ -3818,7 +3785,6 @@
   
       // Abbreviating
       //-----------------------------------------------------------------------
  -
       /**
        * <p>Abbreviates a String using ellipses. This will turn 
        * "Now is the time for all good men" into "Now is the time for..."</p>
  @@ -3918,7 +3884,6 @@
   
       // Difference
       //-----------------------------------------------------------------------
  -
       /**
        * <p>Compares two Strings, and returns the portion where they differ.
        * (More precisely, return the remainder of the second String,
  @@ -4001,7 +3966,6 @@
   
       // Misc
       //-----------------------------------------------------------------------
  -
       /**
        * <p>Find the Levenshtein distance between two Strings.</p>
        *
  
  
  

Mime
View raw message