com.mapinfo.midev.language.filter

## Class LikeFilter

- java.lang.Object
- - com.mapinfo.midev.language.filter.LikeFilter

All Implemented Interfaces:
  IFilter

    public final class LikeFilter
    extends Object
    implements IFilter

Defines a filter that specifies features whose value for the specified attribute matches a specified pattern. The wildcard characters are '_' to match any single character, '%' to match zero or more characters, and '\' to represent an escape.

### Constructor Summary

Constructors
Constructor and Description
`LikeFilter(String attributeName, IAttributeValue patternArgument)` Create a filter that specifies features whose value for the specified attribute matches a specified pattern.
`LikeFilter(String attributeName, IAttributeValue patternArgument, Character escapeCharacter)` Create a filter that specifies features whose value for the specified attribute matches a specified pattern.

### Method Summary

All Methods Instance Methods Concrete Methods
`boolean` `equals(Object o)`
`String` `getAttributeName()` Returns the name of the attribute that will be searched.
`Character` `getEscapeCharacter()` Returns the escape character.
`IAttributeValue` `getPatternArgument()` Returns the pattern value to be compared.
`int` `hashCode()`
`boolean` `isSpatial()` Returns `false`.

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

`getClass, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### LikeFilter

    public LikeFilter(String attributeName,
                      IAttributeValue patternArgument)

Create a filter that specifies features whose value for the specified attribute matches a specified pattern. The wildcard characters are '_' to match any single character, '%' to match zero or more characters, and '\' to represent an escape.

Parameters:
  `attributeName` - Filter this string column.
  `patternArgument` - A pattern with which to filter the string column.

#### LikeFilter

    public LikeFilter(String attributeName,
                      IAttributeValue patternArgument,
                      Character escapeCharacter)

Create a filter that specifies features whose value for the specified attribute matches a specified pattern. The wildcard characters are '_' to match any single character and '%' to match zero or more characters.

Parameters:
  `attributeName` - Filter this string column.
  `patternArgument` - A pattern with which to filter the string column.
  `escapeCharacter` - An escape character in the specified pattern.

### Method Detail

#### getAttributeName

    public String getAttributeName()

Returns the name of the attribute that will be searched.

Returns:
  the name of the attribute that will be searched.

#### getPatternArgument

    public IAttributeValue getPatternArgument()

Returns the pattern value to be compared.

Returns:
  the pattern value to be compared.

#### getEscapeCharacter

    public Character getEscapeCharacter()

Returns the escape character.

Returns:
  the escape character.

#### isSpatial

    public boolean isSpatial()

Returns `false`.

Specified by:
  `isSpatial` in interface `IFilter`
Returns:
  `false`.

#### equals

    public boolean equals(Object o)

Overrides:
  `equals` in class `Object`

#### hashCode

    public int hashCode()

Overrides:
  `hashCode` in class `Object`