Top Description Fields Constructors Methods
org.apache.tools.ant.taskdefs.condition

public Class Contains

extends Object
implements Condition
Class Inheritance
All Implemented Interfaces
org.apache.tools.ant.taskdefs.condition.Condition
Imports
org.apache.tools.ant.BuildException

Is one string part of another string?
Since
Ant 1.5

Field Summary

Modifier and TypeField and Description
private boolean
private String
private String

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public boolean

Returns:

true if the substring is within the string
eval
()

Implements org.apache.tools.ant.taskdefs.condition.Condition.eval.

Is this condition true?
public void
setCasesensitive(boolean
if false, ignore case
b
)

Whether to search ignoring case or not.

public void
setString(String
the string to search in
string
)

The string to search in.

public void
setSubstring(String
the string to search for
subString
)

The string to search for.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

caseSensitiveback to summary
private boolean caseSensitive
stringback to summary
private String string
subStringback to summary
private String subString

Constructor Detail

Containsback to summary
public Contains()

Method Detail

evalback to summary
public boolean eval() throws BuildException

Implements org.apache.tools.ant.taskdefs.condition.Condition.eval.

Doc from org.apache.tools.ant.taskdefs.condition.Condition.eval.

Is this condition true?

Returns:boolean

true if the substring is within the string

Annotations
@Override
Exceptions
BuildException:
if the attributes are not set correctly
Since
Ant 1.5
setCasesensitiveback to summary
public void setCasesensitive(boolean b)

Whether to search ignoring case or not.

Parameters
b:boolean

if false, ignore case

Since
Ant 1.5
setStringback to summary
public void setString(String string)

The string to search in.

Parameters
string:String

the string to search in

Since
Ant 1.5
setSubstringback to summary
public void setSubstring(String subString)

The string to search for.

Parameters
subString:String

the string to search for

Since
Ant 1.5