Class ElementMatcher

  • All Implemented Interfaces:
    Selector

    public class ElementMatcher
    extends java.lang.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 
      Constructor Description
      ElementMatcher​(java.lang.String id, java.lang.Class<?> clazz, java.lang.String tag)  
      ElementMatcher​(java.lang.String id, java.lang.Class<?> clazz, java.util.List<java.lang.String> tagsToMatch)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      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​(java.lang.String id,
                              java.lang.Class<?> clazz,
                              java.lang.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​(java.lang.String id,
                              java.lang.Class<?> clazz,
                              java.util.List<java.lang.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