1 16 19 package com.sun.org.apache.xpath.internal.operations; 20 21 import com.sun.org.apache.xpath.internal.XPathContext; 22 import com.sun.org.apache.xpath.internal.objects.XBoolean; 23 import com.sun.org.apache.xpath.internal.objects.XObject; 24 25 28 public class Equals extends Operation 29 { 30 31 42 public XObject operate(XObject left, XObject right) 43 throws javax.xml.transform.TransformerException 44 { 45 return left.equals(right) ? XBoolean.S_TRUE : XBoolean.S_FALSE; 46 } 47 48 59 public boolean bool(XPathContext xctxt) 60 throws javax.xml.transform.TransformerException 61 { 62 XObject left = m_left.execute(xctxt, true); 63 XObject right = m_right.execute(xctxt, true); 64 65 boolean result = left.equals(right) ? true : false; 66 left.detach(); 67 right.detach(); 68 return result; 69 } 70 71 } 72 | Popular Tags |