Package org.eclipse.e4.ui.workbench.modeling

## Class ElementMatcher

- java.lang.Object
- - org.eclipse.e4.ui.workbench.modeling.ElementMatcher

All Implemented Interfaces:
  `Selector`

    public class ElementMatcher
    extends Object
    implements Selector

This is an implementation of a Selector that implements the existing 'findElements'. Clients may subclass this and override the 'select' method in order to define custom filters.

Since:
  1.1

### Constructor Summary

Constructors
`ElementMatcher​(String id, Class<?> clazz, String tag)`
`ElementMatcher​(String id, Class<?> clazz, List<String> tagsToMatch)`

### Method Summary

All Methods Instance Methods Concrete Methods
`boolean` `select​(MApplicationElement element)` Call for each element to find matching elements

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

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

### Constructor Detail

#### ElementMatcher

    public ElementMatcher​(String id,
                          Class<?> clazz,
                          String tag)

Parameters:
  `id` - The elementId of the desired element
  `clazz` - The class specification of the desired element
  `tag` - A tag which must be specified on the desired element

#### ElementMatcher

    public ElementMatcher​(String id,
                          Class<?> clazz,
                          List<String> tagsToMatch)

Parameters:
  `id` - The elementId of the desired element
  `clazz` - The class specification of the desired element
  `tagsToMatch` - A list of tags which must all be specified on the desired element

### Method Detail

#### select

    public boolean select​(MApplicationElement element)

Description copied from interface: `Selector`
Call for each element to find matching elements

Specified by:
  `select` in interface `Selector`
Parameters:
  `element` - the element
Returns:
  `true` if matches else `false`