|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.mucommander.file.filter.FileFilter
com.mucommander.file.filter.AttributeFileFilter
public class AttributeFileFilter
AttributeFileFilter matches files which have a specific attribute set.
Here's a list of supported file attributes:
Only one attribute can be matched at a time. To match several attributes, combine them using a
ChainedFileFilter.
| Field Summary | |
|---|---|
static int |
ARCHIVE
Tests if the file is an archive. |
static int |
BROWSABLE
Tests if the file is browsable, cf AbstractFile.isBrowsable(). |
static int |
DIRECTORY
Tests if the file is a directory, cf AbstractFile.isDirectory(). |
static int |
FILE
Tests if the file is a regular file, i.e. |
static int |
HIDDEN
Tests if the file is hidden, cf AbstractFile.isHidden(). |
static int |
ROOT
Tests if the file is a root folder, cf AbstractFile.isRoot(). |
static int |
SYMLINK
Tests if the file is a symlink, cf AbstractFile.isSymlink(). |
| Fields inherited from class com.mucommander.file.filter.FileFilter |
|---|
inverted |
| Constructor Summary | |
|---|---|
AttributeFileFilter(int attribute)
Creates a new AttributeFileFilter that matches files which have the specified attribute set. |
|
AttributeFileFilter(int attribute,
boolean inverted)
Creates a new AttributeFileFilter that matches files which have the specified attribute set. |
|
| Method Summary | |
|---|---|
boolean |
accept(AbstractFile file)
Returns true if the given file was accepted by this filter, false if it was rejected. |
int |
getAttribute()
Returns the attribute which files are tested against. |
void |
setAttribute(int attribute)
Sets the attribute which files are tested against. |
| Methods inherited from class com.mucommander.file.filter.FileFilter |
|---|
accept, filter, isInverted, match, match, reject, reject, setInverted |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int DIRECTORY
AbstractFile.isDirectory().
public static final int FILE
DIRECTORY.
public static final int BROWSABLE
AbstractFile.isBrowsable().
public static final int ARCHIVE
public static final int SYMLINK
AbstractFile.isSymlink().
public static final int HIDDEN
AbstractFile.isHidden().
public static final int ROOT
AbstractFile.isRoot().
| Constructor Detail |
|---|
public AttributeFileFilter(int attribute)
AttributeFileFilter that matches files which have the specified attribute set.
This filter will operate in normal, non-inverted mode.
attribute - the attribute to test files against
public AttributeFileFilter(int attribute,
boolean inverted)
AttributeFileFilter that matches files which have the specified attribute set.
This filter operates in the specified mode.
attribute - the attribute to test files againstinverted - if true, this filter will operate in inverted mode.| Method Detail |
|---|
public int getAttribute()
public void setAttribute(int attribute)
attribute - the attribute which files are tested against.public boolean accept(AbstractFile file)
FileFiltertrue if the given file was accepted by this filter, false if it was rejected.
The inverted mode has no effect on the values returned by this method.
accept in class FileFilterfile - the file to test
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
This file is part of muCommander - Copyright (C) 2002-2008 Maxence Bernard