bb.io.filefilter
Class VisibleOrRootFilter
java.lang.Object
javax.swing.filechooser.FileFilter
bb.io.filefilter.BaseFilter
bb.io.filefilter.VisibleFilter
bb.io.filefilter.VisibleOrRootFilter
- All Implemented Interfaces:
- FileFilter
public class VisibleOrRootFilter
- extends VisibleFilter
Subclass of VisibleFilter
that additionally accepts Files which are system roots.
This filter was introduced because it has been observed that Windows (XP, on NTFS disks, at least) marks roots as hidden.
This class is multithread safe: it is immutable
(all of its fields are final, none of their state can be changed after construction,
and it is always properly constructed;
see p. 53 of Java Concurrency In Practice for more discussion).
- Author:
- Brent Boyer
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
VisibleOrRootFilter
public VisibleOrRootFilter()
- Constructs a new VisibleOrRootFilter instance.
passesTest
protected boolean passesTest(File file)
- Description copied from class:
BaseFilter
- Applies this filter's test to file.
Implementation here returns passesTest
( extractPart
(file) )
.
- Overrides:
passesTest
in class VisibleFilter
isRootFile
private boolean isRootFile(File file)
getDescription
public String getDescription()
- Description copied from class:
BaseFilter
-
- Overrides:
getDescription
in class VisibleFilter