org.apache.tools.ant.types.resources.selectors

Class Majority

Implemented Interfaces:
Cloneable, ResourceSelector

public class Majority
extends ResourceSelectorContainer
implements ResourceSelector

Majority ResourceSelector.
Since:
Ant 1.7

Field Summary

Fields inherited from class org.apache.tools.ant.types.DataType

checked, ref

Fields inherited from class org.apache.tools.ant.ProjectComponent

description, location, project

Constructor Summary

Majority()
Default constructor.
Majority(ResourceSelector[] r)
Convenience constructor.

Method Summary

boolean
isSelected(Resource r)
Return true if this Resource is selected.
void
setAllowtie(boolean b)
Set whether ties are allowed.

Methods inherited from class org.apache.tools.ant.types.resources.selectors.ResourceSelectorContainer

add, dieOnCircularReference, getSelectors, hasSelectors, selectorCount

Methods inherited from class org.apache.tools.ant.types.DataType

checkAttributesAllowed, checkChildrenAllowed, circularReference, clone, dieOnCircularReference, dieOnCircularReference, dieOnCircularReference, getCheckedRef, getCheckedRef, getCheckedRef, getCheckedRef, getDataTypeName, getRefid, invokeCircularReferenceCheck, isChecked, isReference, noChildrenAllowed, setChecked, setRefid, toString, tooManyAttributes

Methods inherited from class org.apache.tools.ant.ProjectComponent

clone, getDescription, getLocation, getProject, log, log, setDescription, setLocation, setProject

Constructor Details

Majority

public Majority()
Default constructor.

Majority

public Majority(ResourceSelector[] r)
Convenience constructor.
Parameters:
r - the ResourceSelector[] to add.

Method Details

isSelected

public boolean isSelected(Resource r)
Return true if this Resource is selected.
Specified by:
isSelected in interface ResourceSelector
Parameters:
r - the Resource to check.
Returns:
whether the Resource was selected.

setAllowtie

public void setAllowtie(boolean b)
Set whether ties are allowed.
Parameters:
b - whether a tie is a pass.