1 package com.icl.saxon.expr; 2 import com.icl.saxon.*; 3 import com.icl.saxon.om.*; 4 5 8 9 public final class EmptyNodeSet extends NodeSetValue { 10 11 private static NodeInfo[] emptyArray = new NodeInfo[0]; 12 13 17 18 public Value evaluate(Context context) { 19 return this; 20 } 21 22 27 28 public NodeSetValue evaluateAsNodeSet(Context context) { 29 return this; 30 } 31 32 38 39 public void setSorted(boolean isSorted) {} 40 41 46 47 public boolean isSorted() { 48 return true; 49 } 50 51 56 57 public boolean isContextDocumentNodeSet() { 58 return true; 59 } 60 61 65 66 public String asString() { 67 return ""; 68 } 69 70 74 75 public boolean asBoolean() { 76 return false; 77 } 78 79 83 84 public int getCount() { 85 return 0; 86 } 87 88 89 95 96 public NodeSetValue sort() { 97 return this; 98 } 99 100 104 105 public NodeInfo getFirst() { 106 return null; 107 } 108 109 110 113 114 public boolean equals(Value other) { 115 if (other instanceof BooleanValue) { 116 return !((BooleanValue)other).asBoolean(); 117 } else { 118 return false; 119 } 120 } 121 122 125 126 public boolean notEquals(Value other) { 127 if (other instanceof BooleanValue) { 128 return ((BooleanValue)other).asBoolean(); 129 } else { 130 return false; 131 } 132 } 133 134 137 138 public NodeEnumeration enumerate() { 139 return EmptyEnumeration.getInstance(); 140 } 141 142 } 143 144 163 | Popular Tags |