Class Contains

  • All Implemented Interfaces:
    java.lang.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
      Contains()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean eval()  
      void setCasesensitive​(boolean b)
      Whether to search ignoring case or not.
      void setProperty​(java.lang.String s)
      The name of a property value to search in.
      void setString​(java.lang.String string)
      The string to search in.
      void setSubstring​(java.lang.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 Detail

      • Contains

        public Contains()
    • Method Detail

      • setProperty

        public void setProperty​(java.lang.String s)
        The name of a property value to search in.
        Parameters:
        s - the property name
        Since:
        Ant 1.5
      • setString

        public void setString​(java.lang.String string)
        The string to search in.
        Parameters:
        string - the string to search in
        Since:
        Ant 1.5
      • setSubstring

        public void setSubstring​(java.lang.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