org.apache.tools.ant.taskdefs.condition

Class AntVersion

Implemented Interfaces:
Condition

public class AntVersion
extends java.lang.Object
implements Condition

An Ant version condition.
Since:
Ant 1.7

Method Summary

boolean
eval()
Evalute the condition.
String
getAtLeast()
Get the atleast attribute.
String
getExactly()
Get the exactly attribute.
void
setAtLeast(String atLeast)
Set the atleast attribute.
void
setExactly(String exactly)
Set the exactly attribute.

Method Details

eval

public boolean eval()
            throws BuildException
Evalute the condition.
Specified by:
eval in interface Condition
Returns:
true if the condition is true.
Throws:
BuildException - if an error occurs.

getAtLeast

public String getAtLeast()
Get the atleast attribute.
Returns:
the atleast attribute.

getExactly

public String getExactly()
Get the exactly attribute.
Returns:
the exactly attribute.

setAtLeast

public void setAtLeast(String atLeast)
Set the atleast attribute. This is of the form major.minor.point. For example 1.7.0.
Parameters:
atLeast - the version to check against.

setExactly

public void setExactly(String exactly)
Set the exactly attribute. This is of the form major.minor.point. For example 1.7.0.
Parameters:
exactly - the version to check against.