~ubuntu-branches/ubuntu/quantal/commons-io/quantal

« back to all changes in this revision

Viewing changes to src/java/org/apache/commons/io/filefilter/WildcardFileFilter.java

  • Committer: Bazaar Package Importer
  • Author(s): Varun Hiremath
  • Date: 2008-02-21 13:26:43 UTC
  • mfrom: (1.1.3 upstream) (3.1.1 lenny)
  • Revision ID: james.westby@ubuntu.com-20080221132643-p4c8f8lhb9rnqnlo
Tags: 1.4-1
* New upstream release
* Bump Standards-Version to 3.7.3
* Bump up debhelper compat to 6
* Replace XS-Vcs headers with Vcs
* debian/patches:
  - remove 01_no_ext_links.dpatch - not required
  - remove 02_no_mkdir_in_homedir.dpatch - not required
* Remove dpatch from Build-Depends
* Update debian/rules and debian/libcommons-io-java-doc.install
  with new target dirs
* debian/copyright: add copyright notice

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
package org.apache.commons.io.filefilter;
18
18
 
19
19
import java.io.File;
 
20
import java.io.Serializable;
20
21
import java.util.List;
21
22
 
22
23
import org.apache.commons.io.FilenameUtils;
45
46
 * </pre>
46
47
 *
47
48
 * @author Jason Anderson
48
 
 * @version $Revision: 155419 $ $Date: 2006-08-28 13:57:00 +0200 (Mo, 28 Aug 2006) $
 
49
 * @version $Revision: 155419 $ $Date: 2007-12-22 02:03:16 +0000 (Sat, 22 Dec 2007) $
49
50
 * @since Commons IO 1.3
50
51
 */
51
 
public class WildcardFileFilter extends AbstractFileFilter {
 
52
public class WildcardFileFilter extends AbstractFileFilter implements Serializable {
52
53
 
53
54
    /** The wildcards that will be used to match filenames. */
54
 
    private String[] wildcards;
 
55
    private final String[] wildcards;
55
56
    /** Whether the comparison is case sensitive. */
56
 
    private IOCase caseSensitivity;
 
57
    private final IOCase caseSensitivity;
57
58
 
58
59
    /**
59
60
     * Construct a new case-sensitive wildcard filter for a single wildcard.
171
172
        return false;
172
173
    }
173
174
 
 
175
    /**
 
176
     * Provide a String representaion of this file filter.
 
177
     *
 
178
     * @return a String representaion
 
179
     */
 
180
    public String toString() {
 
181
        StringBuffer buffer = new StringBuffer();
 
182
        buffer.append(super.toString());
 
183
        buffer.append("(");
 
184
        if (wildcards != null) {
 
185
            for (int i = 0; i < wildcards.length; i++) {
 
186
                if (i > 0) {
 
187
                    buffer.append(",");
 
188
                }
 
189
                buffer.append(wildcards[i]);
 
190
            }
 
191
        }
 
192
        buffer.append(")");
 
193
        return buffer.toString();
 
194
    }
 
195
 
174
196
}