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 StringEscapeUtils.java CharSet.java package.html ArrayUtils.java
Date Sat, 16 Aug 2003 11:04:46 GMT
scolebourne    2003/08/16 04:04:46

  Modified:    lang/src/java/org/apache/commons/lang StringEscapeUtils.java
                        CharSet.java package.html ArrayUtils.java
  Log:
  Javadoc changes
  bug 22480, from Pete Gieser
  
  Revision  Changes    Path
  1.24      +4 -1      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.23
  retrieving revision 1.24
  diff -u -r1.23 -r1.24
  --- StringEscapeUtils.java	1 Aug 2003 20:45:17 -0000	1.23
  +++ StringEscapeUtils.java	16 Aug 2003 11:04:46 -0000	1.24
  @@ -72,6 +72,7 @@
    * @author <a href="sean@boohai.com">Sean Brown</a>
    * @author <a href="mailto:ggregory@seagullsw.com">Gary Gregory</a>
    * @author Phil Steitz
  + * @author Pete Gieser
    * @since 2.0
    * @version $Id$
    */
  @@ -308,6 +309,7 @@
        * @param out  the <code>Writer</code> used to output unescaped characters
        * @param str  the <code>String</code> to unescape, may be null
        * @throws IllegalArgumentException if the Writer is <code>null</code>
  +     * @throws IOException if error occurs on undelying Writer
        */
       public static void unescapeJava(Writer out, String str) throws IOException {
           if (out == null) {
  @@ -422,6 +424,7 @@
        * @param out  the <code>Writer</code> used to output unescaped characters
        * @param str  the <code>String</code> to unescape, may be null
        * @throws IllegalArgumentException if the Writer is <code>null</code>
  +     * @throws IOException if error occurs on undelying Writer
        */
       public static void unescapeJavaScript(Writer out, String str) throws IOException {
           unescapeJava(out, str);
  
  
  
  1.15      +21 -19    jakarta-commons/lang/src/java/org/apache/commons/lang/CharSet.java
  
  Index: CharSet.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/lang/src/java/org/apache/commons/lang/CharSet.java,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- CharSet.java	7 Aug 2003 21:12:19 -0000	1.14
  +++ CharSet.java	16 Aug 2003 11:04:46 -0000	1.15
  @@ -62,12 +62,13 @@
   
   /**
    * <p>A set of characters.</p>
  - * 
  + *
    * <p>This class is immutable, but subclasses may not be.</p>
    *
    * @author Henri Yandell
    * @author Stephen Colebourne
    * @author Phil Steitz
  + * @author Pete Gieser
    * @since 1.0
    * @version $Id$
    */
  @@ -75,7 +76,7 @@
   
       /** Serialization lock, Lang version 2.0. */
       private static final long serialVersionUID = 5947847346149275958L;
  -    
  +
       /** A CharSet defining no characters. */
       public static final CharSet EMPTY = new CharSet((String) null);
       /** A CharSet defining ASCII alphabetic characters "a-zA-Z". */
  @@ -86,7 +87,7 @@
       public static final CharSet ASCII_ALPHA_UPPER = new CharSet("A-Z");
       /** A CharSet defining ASCII alphabetic characters "0-9". */
       public static final CharSet ASCII_NUMERIC = new CharSet("0-9");
  -    
  +
       /**
        * A Map of the common cases used in the factory.
        * Subclasses can add more common patterns if desired.
  @@ -101,14 +102,14 @@
           COMMON.put("A-Z", ASCII_ALPHA_UPPER);
           COMMON.put("0-9", ASCII_NUMERIC);
       }
  -    
  +
       /** The set of CharRange objects. */
       private Set set = new HashSet();
   
       //-----------------------------------------------------------------------
       /**
        * <p>Factory method to create a new CharSet using a special syntax.</p>
  -     * 
  +     *
        * <ul>
        *  <li><code>null</code> or empty string ("")
        * - set containing no characters</li>
  @@ -121,7 +122,7 @@
        *  <li>Combinations, such as "abe-g"
        *  - set containing all the characters from the individual sets</li>
        * </ul>
  -     * 
  +     *
        * <p>The matching order is:</p>
        * <ol
        *  <li>Negated multi character range, such as "^a-e"
  @@ -131,7 +132,7 @@
        * </ol>
        * <p>Matching works left to right. Once a match is found the
        * search starts again from the next character.</p>
  -     * 
  +     *
        * <p>If the same range is defined twice using the same syntax, only
        * one range will be kept.
        * Thus, "a-ca-c" creates only one range of "a-c".</p>
  @@ -144,8 +145,9 @@
        * <p>The set of characters represented is the union of the specified ranges.</p>
        *
        * <p>All CharSet objects returned by this method will be immutable.</p>
  -     * 
  +     *
        * @param setStr  the String describing the set, may be null
  +     * @return a CharSet instance
        */
       public static CharSet getInstance(String setStr) {
           Object set = COMMON.get(setStr);
  @@ -170,6 +172,7 @@
        * <p>Constructs a new CharSet using the set syntax.
        * Each string is merged in with the set.</p>
        *
  +     * @param set  Strings to merge into the initial set
        * @throws NullPointerException if set is <code>null</code>
        */
       protected CharSet(String[] set) {
  @@ -183,7 +186,7 @@
       //-----------------------------------------------------------------------
       /**
        * <p>Add a set definition string to the <code>CharSet</code>.</p>
  -     * 
  +     *
        * @param str  set definition string
        */
       protected void add(String str) {
  @@ -218,18 +221,18 @@
       //-----------------------------------------------------------------------
       /**
        * <p>Gets the internal set as an array of CharRange objects.</p>
  -     * 
  +     *
        * @return an array of immutable CharRange objects
        */
       public CharRange[] getCharRanges() {
           return (CharRange[]) set.toArray(new CharRange[set.size()]);
       }
  -    
  +
       //-----------------------------------------------------------------------
       /**
        * <p>Does the <code>CharSet</code> contain the specified
        * character <code>ch</code>.</p>
  -     * 
  +     *
        * @param ch  the character to check for
        * @return <code>true</code> if the set contains the characters
        */
  @@ -248,11 +251,10 @@
       /**
        * <p>Compares two CharSet objects, returning true if they represent
        * exactly the same set of characters defined in the same way.</p>
  -     * 
  +     *
        * <p>The two sets <code>abc</code> and <code>a-c</code>
are <i>not</i>
        * equal according to this method.</p>
  -     * 
  -     * 
  +     *
        * @param obj  the object to compare to
        * @return true if equal
        */
  @@ -269,16 +271,16 @@
   
       /**
        * <p>Gets a hashCode compatable with the equals method.</p>
  -     * 
  +     *
        * @return a suitable hashCode
        */
       public int hashCode() {
           return 89 + set.hashCode();
       }
  -    
  +
       /**
        * <p>Gets a string representation of the set.</p>
  -     * 
  +     *
        * @return string representation of the set
        */
       public String toString() {
  
  
  
  1.4       +1 -0      jakarta-commons/lang/src/java/org/apache/commons/lang/package.html
  
  Index: package.html
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/lang/src/java/org/apache/commons/lang/package.html,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- package.html	31 May 2003 17:16:11 -0000	1.3
  +++ package.html	16 Aug 2003 11:04:46 -0000	1.4
  @@ -2,5 +2,6 @@
   <body>
   Provides highly reusable static utility methods, chiefly concerned 
   with adding value to <code>java.lang</code> and other standard core classes.
  +@since 1.0
   </body>
   </html>
  
  
  
  1.23      +7 -4      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.22
  retrieving revision 1.23
  diff -u -r1.22 -r1.23
  --- ArrayUtils.java	3 Aug 2003 23:29:19 -0000	1.22
  +++ ArrayUtils.java	16 Aug 2003 11:04:46 -0000	1.23
  @@ -76,6 +76,7 @@
    * @author Nikolay Metchev
    * @author Matthew Hawthorne
    * @author Tim O'Brien
  + * @author Pete Gieser
    * @since 2.0
    * @version $Id$
    */
  @@ -1531,6 +1532,7 @@
        * @param array  the array to traverse for looking for the object, may be <code>null</code>
        * @param valueToFind  the value to find
        * @param startIndex  the start index to travers backwards from
  +     * @param tolerance  search for value within plus/minus this amount
        * @return the last index of the value within the array,
        *  <code>-1</code> if not found or <code>null</code> array
input
        */
  @@ -1574,9 +1576,10 @@
        * <p>The method returns <code>false</code> if a <code>null</code>
array
        * is passed in.</p>
        *
  -     * @param array the array to search
  -     * @param valueToFind the value to find
  -     * @param tolerance the array contains the tolerance of the search.
  +     * @param array  the array to search
  +     * @param valueToFind  the value to find
  +     * @param tolerance  the array contains the tolerance of the search
  +     * @return true if value falling within tolerance is in array
        */
       public static boolean contains(final double[] array, final double valueToFind, final
double tolerance) {
           return (indexOf(array, valueToFind, 0, tolerance) != -1);
  
  
  

Mime
View raw message