View Javadoc
1   /**
2    * BSD-style license; for more info see http://pmd.sourceforge.net/license.html
3    */
4   package net.sourceforge.pmd.util.filter;
5   
6   import java.io.File;
7   
8   /**
9    * Directory filter.
10   */
11  public final class DirectoryFilter implements Filter<File> {
12  	public static final DirectoryFilter INSTANCE = new DirectoryFilter();
13  
14  	private DirectoryFilter() {
15  	}
16  
17  	public boolean filter(File file) {
18  		return file.isDirectory();
19  	}
20  	
21  	public String toString() {
22  	    return "is Directory";
23  	}
24  }