Class Equals
java.lang.Object
org.apache.tools.ant.taskdefs.condition.Equals
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleaneval()Is this condition true?voidSet the first argumentvoidSet the first stringvoidSet the second argumentvoidSet the second stringvoidsetCasesensitive(boolean b) Should the comparison be case sensitive?voidsetForcestring(boolean forcestring) Set whether to force string comparisons for non-equal, non-string objects.voidsetTrim(boolean b) Should we want to trim the arguments before comparing them?
-
Constructor Details
-
Equals
public Equals()
-
-
Method Details
-
setArg1
Set the first argument- Parameters:
arg1- the first argument.- Since:
- Ant 1.8
-
setArg1
-
setArg2
Set the second argument- Parameters:
arg2- the second argument.- Since:
- Ant 1.8
-
setArg2
-
setTrim
public void setTrim(boolean b) Should we want to trim the arguments before comparing them?- Parameters:
b- if true trim the arguments- Since:
- Ant 1.5
-
setCasesensitive
public void setCasesensitive(boolean b) Should the comparison be case sensitive?- Parameters:
b- if true use a case sensitive comparison (this is the default)- Since:
- Ant 1.5
-
setForcestring
public void setForcestring(boolean forcestring) Set whether to force string comparisons for non-equal, non-string objects. This allows object properties (legal in Ant 1.8.x+) to be compared as strings.- Parameters:
forcestring- value to set- Since:
- Ant 1.8.1
-
eval
Description copied from interface:ConditionIs this condition true?- Specified by:
evalin interfaceCondition- Returns:
- true if the two strings are equal
- Throws:
BuildException- if the attributes are not set correctly
-