Beispiel #1
0
 /** Is this expression the same as another expression? */
 public boolean equals(Object other) {
   if (!(other instanceof AxisExpression)) {
     return false;
   }
   if (axis != ((AxisExpression) other).axis) {
     return false;
   }
   if (test == null) {
     return ((AxisExpression) other).test == null;
   }
   return test.toString().equals(((AxisExpression) other).test.toString());
 }
Beispiel #2
0
 /**
  * Represent the expression as a string for diagnostics
  *
  * @param pool the name pool, used for expanding names in the node test
  * @return a string representation of the expression
  */
 public String toString(NamePool pool) {
   return Axis.axisName[axis] + "::" + (test == null ? "node()" : test.toString(pool));
 }