Package org.jsoup.select

# Class Evaluator

java.lang.Object
org.jsoup.select.Evaluator

Direct Known Subclasses:
  `CombiningEvaluator`, `Evaluator.AllElements`, `Evaluator.Attribute`, `Evaluator.AttributeKeyPair`, `Evaluator.AttributeStarting`, `Evaluator.AttributeWithValueMatching`, `Evaluator.Class`, `Evaluator.ContainsData`, `Evaluator.ContainsOwnText`, `Evaluator.ContainsText`, `Evaluator.ContainsWholeOwnText`, `Evaluator.ContainsWholeText`, `Evaluator.CssNthEvaluator`, `Evaluator.Id`, `Evaluator.IndexEvaluator`, `Evaluator.IsEmpty`, `Evaluator.IsFirstChild`, `Evaluator.IsLastChild`, `Evaluator.IsOnlyChild`, `Evaluator.IsOnlyOfType`, `Evaluator.IsRoot`, `Evaluator.Matches`, `Evaluator.MatchesOwn`, `Evaluator.MatchesWholeOwnText`, `Evaluator.MatchesWholeText`, `Evaluator.MatchText`, `Evaluator.Tag`, `Evaluator.TagEndsWith`

public abstract class Evaluator extends Object
Evaluates that an element matches the selector.

## Nested Class Summary

Nested Classes
Modifier and Type
Class
Description
`static final class`
`Evaluator.AllElements`
Evaluator for any / all element matching
`static final class`
`Evaluator.Attribute`
Evaluator for attribute name matching
`static class`
`Evaluator.AttributeKeyPair`
Abstract evaluator for attribute name/value matching
`static final class`
`Evaluator.AttributeStarting`
Evaluator for attribute name prefix matching
`static final class`
`Evaluator.AttributeWithValue`
Evaluator for attribute name/value matching
`static final class`
`Evaluator.AttributeWithValueContaining`
Evaluator for attribute name/value matching (value containing)
`static final class`
`Evaluator.AttributeWithValueEnding`
Evaluator for attribute name/value matching (value ending)
`static final class`
`Evaluator.AttributeWithValueMatching`
Evaluator for attribute name/value matching (value regex matching)
`static final class`
`Evaluator.AttributeWithValueNot`
Evaluator for attribute name != value matching
`static final class`
`Evaluator.AttributeWithValueStarting`
Evaluator for attribute name/value matching (value prefix)
`static final class`
`Evaluator.Class`
Evaluator for element class
`static final class`
`Evaluator.ContainsData`
Evaluator for matching Element (and its descendants) data
`static final class`
`Evaluator.ContainsOwnText`
Evaluator for matching Element's own text
`static final class`
`Evaluator.ContainsText`
Evaluator for matching Element (and its descendants) text
`static final class`
`Evaluator.ContainsWholeOwnText`
Evaluator for matching Element (but not its descendants) wholeText.
`static final class`
`Evaluator.ContainsWholeText`
Evaluator for matching Element (and its descendants) wholeText.
`static class`
`Evaluator.CssNthEvaluator`
`static final class`
`Evaluator.Id`
Evaluator for element id
`static final class`
`Evaluator.IndexEquals`
Evaluator for matching by sibling index number (e = idx)
`static class`
`Evaluator.IndexEvaluator`
Abstract evaluator for sibling index matching
`static final class`
`Evaluator.IndexGreaterThan`
Evaluator for matching by sibling index number (e > idx)
`static final class`
`Evaluator.IndexLessThan`
Evaluator for matching by sibling index number (e < idx)
`static final class`
`Evaluator.IsEmpty`
`static final class`
`Evaluator.IsFirstChild`
Evaluator for matching the first sibling (css :first-child)
`static final class`
`Evaluator.IsFirstOfType`
`static final class`
`Evaluator.IsLastChild`
Evaluator for matching the last sibling (css :last-child)
`static final class`
`Evaluator.IsLastOfType`
`static final class`
`Evaluator.IsNthChild`
css-compatible Evaluator for :eq (css :nth-child)
`static final class`
`Evaluator.IsNthLastChild`
css pseudo class :nth-last-child)
`static class`
`Evaluator.IsNthLastOfType`
`static class`
`Evaluator.IsNthOfType`
css pseudo class nth-of-type
`static final class`
`Evaluator.IsOnlyChild`
`static final class`
`Evaluator.IsOnlyOfType`
`static final class`
`Evaluator.IsRoot`
css3 pseudo-class :root
`static final class`
`Evaluator.Matches`
Evaluator for matching Element (and its descendants) text with regex
`static final class`
`Evaluator.MatchesOwn`
Evaluator for matching Element's own text with regex
`static final class`
`Evaluator.MatchesWholeOwnText`
Evaluator for matching Element's own whole text with regex.
`static final class`
`Evaluator.MatchesWholeText`
Evaluator for matching Element (and its descendants) whole text with regex.
`static final class`
`Evaluator.MatchText`
`static final class`
`Evaluator.Tag`
Evaluator for tag name
`static final class`
`Evaluator.TagEndsWith`
Evaluator for tag name that ends with

## Constructor Summary

Constructors
Modifier
Constructor
Description
`protected`
`Evaluator()`

## Method Summary

Modifier and Type
Method
Description
`abstract boolean`
`matches(Element root, Element element)`
Test if the element meets the evaluator's requirements.

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

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

## Constructor Details

### Evaluator

protected Evaluator()

## Method Details

### matches

public abstract boolean matches(Element root, Element element)
Test if the element meets the evaluator's requirements.

Parameters:
  `root` - Root of the matching subtree
  `element` - tested element
Returns:
  Returns `true` if the requirements are met or `false` otherwise