gnu.xml.xpath

Class Selector

Implemented Interfaces:
XPathExpression

public final class Selector
extends gnu.xml.xpath.Path

A single component of a location path.

Field Summary

static int
ANCESTOR
static int
ANCESTOR_OR_SELF
static int
ATTRIBUTE
static int
CHILD
static int
DESCENDANT
static int
DESCENDANT_OR_SELF
static int
FOLLOWING
static int
FOLLOWING_SIBLING
static int
NAMESPACE
static int
PARENT
static int
PRECEDING
static int
PRECEDING_SIBLING
static int
SELF

Fields inherited from class gnu.xml.xpath.Expr

decimalFormat, documentOrderComparator

Constructor Summary

Selector(int axis, List tests)

Method Summary

Expr
clone(Object context)
Object
evaluate(Node context, int pos, int len)
Test[]
getTests()
Returns the list of tests to perform on candidates.
boolean
matches(Node context)
String
toString()

Methods inherited from class gnu.xml.xpath.Pattern

matches

Methods inherited from class gnu.xml.xpath.Expr

_boolean, _id, _local_name, _name, _namespace_uri, _number, _string, clone, evaluate, evaluate, evaluate, evaluate, evaluate, stringValue, stringValue

Field Details

ANCESTOR

public static final int ANCESTOR

Field Value:
0


ANCESTOR_OR_SELF

public static final int ANCESTOR_OR_SELF

Field Value:
1


ATTRIBUTE

public static final int ATTRIBUTE

Field Value:
2


CHILD

public static final int CHILD

Field Value:
3


DESCENDANT

public static final int DESCENDANT

Field Value:
4


DESCENDANT_OR_SELF

public static final int DESCENDANT_OR_SELF

Field Value:
5


FOLLOWING

public static final int FOLLOWING

Field Value:
6


FOLLOWING_SIBLING

public static final int FOLLOWING_SIBLING

Field Value:
7


NAMESPACE

public static final int NAMESPACE

Field Value:
8


PARENT

public static final int PARENT

Field Value:
9


PRECEDING

public static final int PRECEDING

Field Value:
10


PRECEDING_SIBLING

public static final int PRECEDING_SIBLING

Field Value:
11


SELF

public static final int SELF

Field Value:
12

Constructor Details

Selector

public Selector(int axis,
                List tests)

Method Details

clone

public Expr clone(Object context)
Overrides:
clone in interface Expr


evaluate

public Object evaluate(Node context,
                       int pos,
                       int len)
Overrides:
evaluate in interface Expr


getTests

public Test[] getTests()
Returns the list of tests to perform on candidates.


matches

public boolean matches(Node context)
Overrides:
matches in interface Pattern


toString

public String toString()