scolebourne    2004/08/28 02:14:21

  Modified:    lang/src/java/org/apache/commons/lang Tokenizer.java
  Log:
  Change constructors to take Matcher, not CharSetMatcher
  
  Revision  Changes    Path
  1.7       +32 -36    
jakarta-commons/lang/src/java/org/apache/commons/lang/Tokenizer.java
  
  Index: Tokenizer.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-commons/lang/src/java/org/apache/commons/lang/Tokenizer.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- Tokenizer.java    19 Feb 2004 21:04:03 -0000      1.6
  +++ Tokenizer.java    28 Aug 2004 09:14:21 -0000      1.7
  @@ -152,17 +152,16 @@
   
       //-----------------------------------------------------------------------
       /**
  -     * Get a tokenizer instance which parses Comma Seperated Value
  -     * strings.  You must call a "reset" method to set the string which
  -     * you want to parse.
  +     * Gets a new tokenizer instance which parses Comma Seperated Value strings.
  +     * You must call a "reset" method to set the string which you want to parse.
        */
       public static final Tokenizer getCSVInstance() {
           return (Tokenizer)(CSV_TOKENIZER_PROTOTYPE.clone());
       }
   
       /**
  -     * Get a tokenizer instance which parses Comma Seperated Value
  -     * strings, initializing it with the given input.
  +     * Gets a new tokenizer instance which parses Comma Seperated Value strings
  +     * initializing it with the given input.
        * 
        * @param input  the string to parse
        */
  @@ -173,8 +172,8 @@
       }
   
       /**
  -     * Get a tokenizer instance which parses Comma Seperated Value
  -     * strings, initializing it with the given input.
  +     * Gets a new tokenizer instance which parses Comma Seperated Value strings
  +     * initializing it with the given input.
        * 
        * @param input  the text to parse
        */
  @@ -185,17 +184,16 @@
       }
   
       /**
  -     * Get a tokenizer instance which parses Tab Seperated Value
  -     * strings.  You must call a "reset" method to set the string which
  -     * you want to parse.
  +     * Gets a new tokenizer instance which parses Tab Seperated Value strings.
  +     * You must call a "reset" method to set the string which you want to parse.
        */
       public static final Tokenizer getTSVInstance() {
           return (Tokenizer)(TSV_TOKENIZER_PROTOTYPE.clone());
       }
   
       /**
  -     * Get a tokenizer instance which parses Tab Seperated Value
  -     * strings, initializing it with the given input.
  +     * Gets a new tokenizer instance which parses Tab Seperated Value strings
  +     * initializing it with the given input.
        * 
        * @param input  the string to parse
        */
  @@ -206,8 +204,8 @@
       }
   
       /**
  -     * Get a tokenizer instance which parses Tab Seperated Value
  -     * strings, initializing it with the given input.
  +     * Gets a new tokenizer instance which parses Tab Seperated Value strings
  +     * initializing it with the given input.
        * 
        * @param input  the text to parse
        */
  @@ -243,20 +241,19 @@
       }
   
       /**
  -     * Constructs a tokenizer splitting on space, tab, newline and formfeed
  -     * as per StringTokenizer.
  +     * Constructs a tokenizer splitting using the specified delimiter matcher.
        * 
        * @param input  the string which is to be parsed
  -     * @param delim  the field delimiter character
  +     * @param delim  the field delimiter matcher
        */
  -    public Tokenizer(String input, CharSetMatcher delim) {
  +    public Tokenizer(String input, Matcher delim) {
           this(input);
           setDelimiterMatcher(delim);
       }
   
       /**
  -     * Constructs a tokenizer splitting on space, tab, newline and formfeed
  -     * as per StringTokenizer.
  +     * Constructs a tokenizer splitting on the specified delimiter character
  +     * and handling quotes using the specified quote character.
        * 
        * @param input  the string which is to be parsed
        * @param delim  the field delimiter character
  @@ -268,14 +265,14 @@
       }
   
       /**
  -     * Constructs a tokenizer splitting on space, tab, newline and formfeed
  -     * as per StringTokenizer.
  +     * Constructs a tokenizer splitting using the specified delimiter matcher
  +     * and handling quotes using the specified quote matcher.
        * 
        * @param input  the string which is to be parsed
  -     * @param delim  the field delimiter character
  -     * @param quote  the field quoted string character
  +     * @param delim  the field delimiter matcher
  +     * @param quote  the field quoted string matcher
        */
  -    public Tokenizer(String input, CharSetMatcher delim, CharSetMatcher quote) {
  +    public Tokenizer(String input, Matcher delim, Matcher quote) {
           this(input, delim);
           setQuoteMatcher(quote);
       }
  @@ -305,20 +302,19 @@
       }
   
       /**
  -     * Constructs a tokenizer splitting on space, tab, newline and formfeed
  -     * as per StringTokenizer.
  +     * Constructs a tokenizer splitting using the specified delimiter matcher.
        * 
        * @param input  the string which is to be parsed, cloned
  -     * @param delim  the field delimiter character
  +     * @param delim  the field delimiter matcher
        */
  -    public Tokenizer(char[] input, CharSetMatcher delim) {
  +    public Tokenizer(char[] input, Matcher delim) {
           this(input);
           setDelimiterMatcher(delim);
       }
   
       /**
  -     * Constructs a tokenizer splitting on space, tab, newline and formfeed
  -     * as per StringTokenizer.
  +     * Constructs a tokenizer splitting on the specified delimiter character
  +     * and handling quotes using the specified quote character.
        * 
        * @param input  the string which is to be parsed, cloned
        * @param delim  the field delimiter character
  @@ -330,14 +326,14 @@
       }
   
       /**
  -     * Constructs a tokenizer splitting on space, tab, newline and formfeed
  -     * as per StringTokenizer.
  +     * Constructs a tokenizer splitting using the specified delimiter matcher
  +     * and handling quotes using the specified quote matcher.
        * 
        * @param input  the string which is to be parsed, cloned
        * @param delim  the field delimiter character
        * @param quote  the field quoted string character
        */
  -    public Tokenizer(char[] input, CharSetMatcher delim, CharSetMatcher quote) {
  +    public Tokenizer(char[] input, Matcher delim, Matcher quote) {
           this(input, delim);
           setQuoteMatcher(quote);
       }
  @@ -642,7 +638,7 @@
               // Quoting mode can occur several times throughout
               // a given string, so must switch between quoting
               // and non-quoting until we encounter a non-quoted
  -            // delimiter, or end of string, which inidicates end
  +            // delimiter, or end of string, which indicates end
               // of token.
               if (quoting) {
                   // If we've found a quote character, see if it's
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to