FileDocCategorySizeDatePackage
NoneSelector.javaAPI DocApache Ant 1.702433Wed Dec 13 06:16:18 GMT 2006org.apache.tools.ant.types.selectors

NoneSelector

public class NoneSelector extends BaseSelectorContainer
This selector has a collection of other selectors. All of those selectors must refuse to select a file before the file is considered selected by this selector.
since
1.5

Fields Summary
Constructors Summary
public NoneSelector()
Default constructor.

    
Methods Summary
public booleanisSelected(java.io.File basedir, java.lang.String filename, java.io.File file)
Returns true (the file is selected) only if all other selectors agree that the file should not be selected.

param
basedir the base directory the scan is being done from
param
filename is the name of the file to check
param
file is a java.io.File object for the filename that the selector can use
return
whether the file should be selected or not

        validate();
        Enumeration e = selectorElements();
        boolean result;

        while (e.hasMoreElements()) {
            result = ((FileSelector) e.nextElement()).isSelected(basedir,
                    filename, file);
            if (result) {
                return false;
            }
        }
        return true;
    
public java.lang.StringtoString()

return
a string representation of the selector

        StringBuffer buf = new StringBuffer();
        if (hasSelectors()) {
            buf.append("{noneselect: ");
            buf.append(super.toString());
            buf.append("}");
        }
        return buf.toString();