org.apache.tools.ant.taskdefs.condition

Class Contains

Implemented Interfaces:
Condition

public class Contains
extends java.lang.Object
implements Condition

Is one string part of another string?
Since:
Ant 1.5

Method Summary

boolean
eval()
void
setCasesensitive(boolean b)
Whether to search ignoring case or not.
void
setString(String string)
The string to search in.
void
setSubstring(String subString)
The string to search for.

Method Details

eval

public boolean eval()
            throws BuildException
Specified by:
eval in interface Condition
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 true, 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

Copyright B) 2000-2007 Apache Software Foundation. All Rights Reserved.