Class Contains

java.lang.Object
org.apache.tools.ant.ProjectComponent
org.apache.tools.ant.taskdefs.condition.IsTrue
ise.antelope.tasks.Contains
All Implemented Interfaces:
Cloneable, org.apache.tools.ant.taskdefs.condition.Condition

public class Contains extends org.apache.tools.ant.taskdefs.condition.IsTrue
  • Field Summary

    Fields inherited from class org.apache.tools.ant.ProjectComponent

    description, location, project
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
     
    void
    setCasesensitive(boolean b)
    Whether to search ignoring case or not.
    void
    The name of a property value to search in.
    void
    setString(String string)
    The string to search in.
    void
    setSubstring(String subString)
    The string to search for.

    Methods inherited from class org.apache.tools.ant.taskdefs.condition.IsTrue

    setValue

    Methods inherited from class org.apache.tools.ant.ProjectComponent

    clone, getDescription, getLocation, getProject, log, log, setDescription, setLocation, setProject

    Methods inherited from class java.lang.Object

    equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • Contains

      public Contains()
  • Method Details

    • setProperty

      public void setProperty(String s)
      The name of a property value to search in.
      Parameters:
      s - the property name
      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
    • setCasesensitive

      public void setCasesensitive(boolean b)
      Whether to search ignoring case or not.
      Parameters:
      b - if true, ignore case
      Since:
      Ant 1.5
    • eval

      public boolean eval() throws org.apache.tools.ant.BuildException
      Specified by:
      eval in interface org.apache.tools.ant.taskdefs.condition.Condition
      Overrides:
      eval in class org.apache.tools.ant.taskdefs.condition.IsTrue
      Returns:
      true if the substring is within the string
      Throws:
      org.apache.tools.ant.BuildException - if the attributes are not set correctly
      Since:
      Ant 1.5