1 package net.sf.saxon.pattern; 2 import net.sf.saxon.om.Item; 3 import net.sf.saxon.om.NodeInfo; 4 import net.sf.saxon.type.Type; 5 import net.sf.saxon.type.ItemType; 6 import net.sf.saxon.tinytree.TinyTree; 7 8 14 15 public final class NoNodeTest extends NodeTest { 16 17 private static NoNodeTest instance = new NoNodeTest(); 18 19 22 23 public static NoNodeTest getInstance() { 24 return instance; 25 } 26 27 public final int getPrimitiveType() { 28 return Type.EMPTY; 29 } 30 31 39 40 public ItemType getPrimitiveItemType() { 41 return this; 42 } 43 44 49 50 public boolean matchesItem(Item item) { 51 return false; 52 } 53 54 55 60 61 public boolean matches(int nodeType, int fingerprint, int annotation) { 62 return false; 63 } 64 65 76 77 public boolean matches(TinyTree tree, int nodeNr) { 78 return false; 79 } 80 81 87 88 public boolean matches(NodeInfo node) { 89 return false; 90 } 91 92 93 96 97 public final double getDefaultPriority() { 98 return -0.5; 99 } 100 101 105 106 public int getNodeKindMask() { 107 return 0; 108 } 109 110 public String toString() { 111 return "empty()"; 112 } 113 114 117 118 public int hashCode() { 119 return "NoNodeTest".hashCode(); 120 } 121 122 123 } 124 125 | Popular Tags |