com.amazonaws.jmespath

## Class JmesPathContainsFunction

- java.lang.Object
- - com.amazonaws.jmespath.JmesPathFunction
  - - com.amazonaws.jmespath.JmesPathContainsFunction

All Implemented Interfaces:
  JmesPathExpression

    public class JmesPathContainsFunction
    extends JmesPathFunction

Implements the contains function that checks if the given array or string contains the given element

### Constructor Summary

Constructors
Constructor and Description
`JmesPathContainsFunction(JmesPathExpression... expressions)`
`JmesPathContainsFunction(List<JmesPathExpression> expressions)` Constructs a new JmesPathContainsFunction with the given list of expressions to be evaluated

### Method Summary

All Methods Instance Methods Concrete Methods
`com.fasterxml.jackson.databind.JsonNode` `evaluate(List<com.fasterxml.jackson.databind.JsonNode> evaluatedArgs)` Retrieves the subject(lhs expression) which could be an array or string, the search(rhs expression) which could be any JmesPath expression.

### Methods inherited from class com.amazonaws.jmespath.JmesPathFunction

`accept, getExpressions`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### JmesPathContainsFunction

    public JmesPathContainsFunction(JmesPathExpression... expressions)

#### JmesPathContainsFunction

    public JmesPathContainsFunction(List<JmesPathExpression> expressions)

Constructs a new JmesPathContainsFunction with the given list of expressions to be evaluated

Parameters:
  `expressions` - List of expressions

### Method Detail

#### evaluate

    public com.fasterxml.jackson.databind.JsonNode evaluate(List<com.fasterxml.jackson.databind.JsonNode> evaluatedArgs)

Retrieves the subject(lhs expression) which could be an array or string, the search(rhs expression) which could be any JmesPath expression. If subject is an array, this function returns true if one of the elements in the array is equal to the provided search value. If the provided subject is a string, this function returns true if the string contains the provided search argument.

Specified by:
  `evaluate` in class `JmesPathFunction`
Parameters:
  `evaluatedArgs` - List of input expressions
Returns:
  True subject contains search; False otherwise