Class KindTest


public class KindTest extends Test
Simple node kind test.
Author:
BaseX Team 2005-21, BSD License, Christian Gruen
  • Field Details

    • DOC

      public static final KindTest DOC
      Generic document node test.
    • ELM

      public static final KindTest ELM
      Generic element node test.
    • ATT

      public static final KindTest ATT
      Generic attribute node test.
    • PI

      public static final KindTest PI
      Generic PI node test.
    • TXT

      public static final KindTest TXT
      Generic text node test. No other NodeType.TEXT tests exist.
    • COM

      public static final KindTest COM
      Generic comment node test. No other NodeType.COMMENT tests exist.
    • NSP

      public static final KindTest NSP
      Generic namespace node test. No other NodeType.COMMENT tests exist.
    • NOD

      public static final KindTest NOD
      Generic node test. No other NodeType.NODE tests exist.
  • Method Details

    • get

      public static KindTest get(NodeType type)
      Returns a test instance.
      Parameters:
      type - node type
      Returns:
      kind test
    • copy

      public final KindTest copy()
      Description copied from class: Test
      Copies this test.
      Specified by:
      copy in class Test
      Returns:
      deep copy
    • matches

      public boolean matches(ANode node)
      Description copied from class: Test
      Checks if the specified node matches the test.
      Specified by:
      matches in class Test
      Parameters:
      node - node to be checked
      Returns:
      result of check
    • 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 class Test
      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.
      Specified by:
      intersect in class Test
      Parameters:
      test - other test
      Returns:
      intersection if it exists, null otherwise
    • equals

      public final boolean equals(Object obj)
      Overrides:
      equals in class Object
    • toString

      public String toString(boolean full)
      Description copied from class: Test
      Returns a string representation of this test.
      Specified by:
      toString in class Test
      Parameters:
      full - include node type
      Returns:
      string