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.XNumber; 23 import com.sun.org.apache.xpath.internal.objects.XObject; 24 25 28 public class Div extends Operation 29 { 30 31 42 public XObject operate(XObject left, XObject right) 43 throws javax.xml.transform.TransformerException 44 { 45 return new XNumber(left.num() / right.num()); 46 } 47 48 57 public double num(XPathContext xctxt) 58 throws javax.xml.transform.TransformerException 59 { 60 61 return (m_left.num(xctxt) / m_right.num(xctxt)); 62 } 63 64 } 65 | Popular Tags |