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

Size

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

Fields Summary
private long
size
private org.apache.tools.ant.types.Comparison
when
Constructors Summary
Methods Summary
public longgetSize()
Get the size compared to by this Size ResourceSelector.

return
the long resource size.

        return size;
    
public org.apache.tools.ant.types.ComparisongetWhen()
Get the comparison mode.

return
a Comparison object.

        return when;
    
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.

        long diff = r.getSize() - size;
        return when.evaluate(diff == 0 ? 0 : (int) (diff / Math.abs(diff)));
    
public voidsetSize(long l)
Set the size to compare against.

param
l the long resource size.


                     
        
        size = l;
    
public voidsetWhen(org.apache.tools.ant.types.Comparison c)
Set the comparison mode.

param
c a Comparison object.

        when = c;