FileDocCategorySizeDatePackage
Name.javaAPI DocApache Ant 1.702309Wed Dec 13 06:16:20 GMT 2006org.apache.tools.ant.types.resources.selectors

Name

public class Name extends Object implements ResourceSelector
Name ResourceSelector.
since
Ant 1.7

Fields Summary
private String
pattern
private boolean
cs
Constructors Summary
Methods Summary
public java.lang.StringgetName()
Get the pattern used by this Name ResourceSelector.

return
the String selection pattern.

        return pattern;
    
public booleanisCaseSensitive()
Learn whether this Name ResourceSelector is case-sensitive.

return
boolean case-sensitivity flag.

        return cs;
    
public booleanisSelected(org.apache.tools.ant.types.Resource r)
Return true if this Resource is selected.

param
r the Resource to check.
return
whether the Resource was selected.

        String n = r.getName();
        if (SelectorUtils.match(pattern, n, cs)) {
            return true;
        }
        String s = r.toString();
        return s.equals(n) ? false : SelectorUtils.match(pattern, s, cs);
    
public voidsetCaseSensitive(boolean b)
Set whether the name comparisons are case-sensitive.

param
b boolean case-sensitivity flag.

        cs = b;
    
public voidsetName(java.lang.String n)
Set the pattern to compare names against.

param
n the pattern String to set.


                       
        
        pattern = n;