Package org.basex.query.expr.path
Class KindTest
- java.lang.Object
-
- org.basex.query.expr.ExprInfo
-
- org.basex.query.expr.path.Test
-
- org.basex.query.expr.path.KindTest
-
public class KindTest extends Test
Simple node kind test.- Author:
- BaseX Team 2005-24, BSD License, Christian Gruen
-
-
Field Summary
Fields Modifier and Type Field Description static KindTest
ATTRIBUTE
Generic attribute node test.static KindTest
COMMENT
Generic comment node test.static KindTest
DOCUMENT_NODE
Generic document node test.static KindTest
ELEMENT
Generic element node test.static KindTest
NAMESPACE_NODE
Generic namespace node test.static KindTest
NODE
Generic node test.static KindTest
PROCESSING_INSTRUCTION
Generic PI node test.static KindTest
TEXT
Generic text node test.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description KindTest
copy()
Copies this test.boolean
equals(Object obj)
static KindTest
get(NodeType type)
Returns a test instance.boolean
instanceOf(Test test)
Checks if the current test is an instance of the specified test.Test
intersect(Test test)
Computes the intersection between two tests.boolean
matches(ANode node)
Checks if the specified node matches the test.Boolean
matches(SeqType seqType)
Checks if the current test will match items of the specified type.String
toString(boolean full)
Returns a string representation of this test.-
Methods inherited from class org.basex.query.expr.path.Test
get, get, matches, optimize, toString, toXml
-
Methods inherited from class org.basex.query.expr.ExprInfo
description, info, toErrorString, toString
-
-
-
-
Field Detail
-
DOCUMENT_NODE
public static final KindTest DOCUMENT_NODE
Generic document node test.
-
ELEMENT
public static final KindTest ELEMENT
Generic element node test.
-
ATTRIBUTE
public static final KindTest ATTRIBUTE
Generic attribute node test.
-
PROCESSING_INSTRUCTION
public static final KindTest PROCESSING_INSTRUCTION
Generic PI node test.
-
TEXT
public static final KindTest TEXT
Generic text node test. No otherNodeType.TEXT
tests exist.
-
COMMENT
public static final KindTest COMMENT
Generic comment node test. No otherNodeType.COMMENT
tests exist.
-
NAMESPACE_NODE
public static final KindTest NAMESPACE_NODE
Generic namespace node test. No otherNodeType.COMMENT
tests exist.
-
NODE
public static final KindTest NODE
Generic node test. No otherNodeType.NODE
tests exist.
-
-
Method Detail
-
get
public static KindTest get(NodeType type)
Returns a test instance.- Parameters:
type
- node type- Returns:
- kind test
-
matches
public boolean matches(ANode node)
Description copied from class:Test
Checks if the specified node matches the test.
-
matches
public Boolean matches(SeqType seqType)
Description copied from class:Test
Checks if the current test will match items of the specified type.
-
instanceOf
public boolean instanceOf(Test test)
Description copied from class:Test
Checks if the current test is an instance of the specified test.- Overrides:
instanceOf
in classTest
- Parameters:
test
- test to be checked- Returns:
- result of check
-
intersect
public Test intersect(Test test)
Description copied from class:Test
Computes the intersection between two tests.
-
-