Ejemplo n.º 1
0
 /**
  * Returns the string representation of this node. This is the same as the string used to
  * construct the node, unless the node has been normalized, in which case the output will be the
  * normalized representation of the string used to construct this node.
  *
  * @return The string representation of this node
  */
 public String toString() {
   if (feature == null) {
     return nodeName;
   }
   String trueName = trueNode.toString(), falseName = falseNode.toString();
   if (trueName.length() == 0 && falseName.length() == 0) {
     return ""; //$NON-NLS-1$
   }
   StringBuffer sb = new StringBuffer();
   sb.append(feature).append("?").append(trueName); // $NON-NLS-1$
   if (falseName.length() > 0) {
     sb.append(":").append(falseName); // $NON-NLS-1$
   }
   return sb.toString();
 }