org.apache.tools.ant.taskdefs.condition

Class Contains

public class Contains extends Object implements Condition

Is one string part of another string?

Since: Ant 1.5

Method Summary
booleaneval()
voidsetCasesensitive(boolean b)
Whether to search ignoring case or not.
voidsetString(String string)
The string to search in.
voidsetSubstring(String subString)
The string to search for.

Method Detail

eval

public boolean eval()

Returns: true if the substring is within the string

Throws: BuildException if the attributes are not set correctly

Since: Ant 1.5

setCasesensitive

public void setCasesensitive(boolean b)
Whether to search ignoring case or not.

Parameters: b if false, ignore case

Since: Ant 1.5

setString

public void setString(String string)
The string to search in.

Parameters: string the string to search in

Since: Ant 1.5

setSubstring

public void setSubstring(String subString)
The string to search for.

Parameters: subString the string to search for

Since: Ant 1.5