de.enough.polish.propertyfunctions
Class ContainsFunction

java.lang.Object
  extended by de.enough.polish.Extension
      extended by de.enough.polish.propertyfunctions.PropertyFunction
          extended by de.enough.polish.propertyfunctions.ContainsFunction
Direct Known Subclasses:
ContainsIgnoreCaseFunction

public class ContainsFunction
extends PropertyFunction

Checks if the input contains a defined value.

Example:

 //#if ${ contains( Windows, polish.OS ) }
 

Copyright Enough Software 2007

 history
        4-April-2007 - rob creation
 

Author:
Robert Virkus, j2mepolish@enough.de

Field Summary
 
Fields inherited from class de.enough.polish.Extension
antProject, autoStartCondition, environment, extensionDefinition, extensionManager, extensionSetting, extensionTypeDefinition, isBuildStarted
 
Constructor Summary
ContainsFunction()
          Create a new function
 
Method Summary
protected  boolean contains(String search, String value)
          Determines whether the value contains the search string
 String process(String input, String[] arguments, Environment env)
          Processes the given input.
 
Methods inherited from class de.enough.polish.propertyfunctions.PropertyFunction
execute, needsDefinedPropertyValue
 
Methods inherited from class de.enough.polish.Extension
configure, executeAntTarget, executeAntTarget, finalize, getAntProject, getAutoStartCondition, getEnvironment, getExtensionDefinition, getExtensionSetting, getInstance, getParameterValue, getType, init, initialize, isConditionFulfilled, notifyBuildEnd, notifyBuildStart
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ContainsFunction

public ContainsFunction()
Create a new function

Method Detail

process

public String process(String input,
                      String[] arguments,
                      Environment env)
Description copied from class: PropertyFunction
Processes the given input.

Specified by:
process in class PropertyFunction
Parameters:
input - the input
arguments - any additional arguments, null if none are given
env - the environment settings
Returns:
the processed input

contains

protected boolean contains(String search,
                           String value)
Determines whether the value contains the search string

Parameters:
search - the string that should be contained within the value
value - the value
Returns:
true when the string is contained