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

NotSelector

public class NotSelector extends NoneSelector
This selector has one other selectors whose meaning it inverts. It actually relies on NoneSelector for its implementation of the isSelected() method, but it adds a check to ensure there is only one other selector contained within.
since
1.5

Fields Summary
Constructors Summary
public NotSelector()
Default constructor.

    
public NotSelector(FileSelector other)
Constructor that inverts the meaning of its argument.

param
other the selector to invert
since
Ant 1.7

        this();
        appendSelector(other);
    
Methods Summary
public java.lang.StringtoString()

return
a string representation of the selector

        StringBuffer buf = new StringBuffer();
        if (hasSelectors()) {
            buf.append("{notselect: ");
            buf.append(super.toString());
            buf.append("}");
        }
        return buf.toString();
    
public voidverifySettings()
Makes sure that there is only one entry, sets an error message if not.

        if (selectorCount() != 1) {
            setError("One and only one selector is allowed within the "
                + "<not> tag");
        }